Rework shutdown

This set of patches is intended to make sure that the agent will reliably stop after a reasonable time if it has been requested to, even in some corner cases.

I removed the counting of shutdown requests: One request needs to be enough in case of for example a shutdown of the host or an automated restart.
I may have put this here....but what do you think about having this inside of Agent.\_\_init\_\_ instead of here?  That way we're always guaranteed to have the signal registered.