Cleanup: subsystems can register cleanup handlers with Engine.OnShutdown

This paves the way to a larger cleanup patch which will disentangle the following functions, which are currently all mised together:

* 1) Waiting for jobs to terminate when shutting down
* 2) Handling signals in the Docker daemon
* 3) Per-subsystem cleanup handlers
* 4) pidfile management

Let's not make mutex public. I like mu sync.Mutex, so developers wouldn't be tempted to use it outside engine.