[medium] add shutdown operation to agent socket

To prevent any user from being able to shut down
an agent, the operation must be requested with the agent
secret ID, which is only readable by root.