Implement first part of the application lifecylce management

If an application wants to be managed through it's lifecycle it needs to register itself
with the application manager in order to receive lifecycle events. Registration is managed
as simple subscription where each subscriber is handled individually by the application
manager. Currently relaunch is the only implemented lifecycle event.

Signed-off-by: Simon Busch <morphis@gravedo.de>