feat(shutdown): Add the ability for an app to shutdown

Adds a new `$shutdown` service that can be used to shutdown an app
and the `$shutdownProvider` that can be used to register tasks that
need to be executed when shuting down an app