Rewrite starting and stopping of the activity recognition

Management of a subscription to an activity recognition updates should be done from the main activity.
Activity recognition service can send them even when the application is stopped or unloaded from memory.

In particular, fixed bug that  the activity recognition service continue to send updates after exiting the application and after turning off the power saving mode.