Description
Related to elastic/kibana#67409
We need to improve the way we unenroll agent.
Currently it's done by revoking all API keys used by the agent, and the agent guess that it should unenroll if he start receiving 401.
We can to improve this to support:
- a gracefull unenrollment, that give time to the agent to send back all the information we want to both Kibana and ES
- the agent need to uninstall endpoint
- we still need to support a way to instantly unenroll agent where we revoke all API keys