Prepare ApplicationService for managing multiple apps.

Prepare ApplicationService for managing multiple apps: it stores now scoped_vector of applications.
The ApplicationService interaface was cleaned.
Applcation Observer API was introduced to notify ApplicationService that the app has been closed.