Add support for PRE_SHUTDOWN service control signals

See commit messages for details.
The apps are all signalled by the Windows Service Control Manager, which will wait until every service has entered the stopped state (or stops responding for more than 3 minutes at which point it will terminate it). If you have dependant services that need to be shutdown in order, the order can be configured via the registry ala: http://blogs.technet.com/b/askperf/archive/2008/02/04/ws2008-service-shutdown-and-crash-handling.aspx

I don't think it creates any race conditions, but I'm not really sure how to determine that.