Added BackgroundTaskHandler.

This class manages tasks that should be performed when the app is put into
the background (cleanup tasks, for example).