Bug 845305 - [Perf] Add startup test for the template app

The template app sometimes launches faster than the the app opening transition,
so it exhibited a corner case where the window_manager would not call the
callback after killing an app.
Bug 816484: remember when GPS/Wifi have been suspended by Airplane mode
Merge pull request #8273 from fabi1cazenave/persistentSettings-bug816484-dry

Bug 816484: remember when GPS/Wifi have been suspended by Airplane mode, r=timdream