Bug 982663: collect and report app usage data

This patch does not have tests yet, and is still missing a couple of features, but it has working code and is ready for feedback and preliminary review.
We are not using this pattern in System app anymore. Everything should be constructor function. Limiting the set of JavaScript pattern used is troublesome for some, but it help other people to pick up the code in the long run and improves re-usability.

Maybe having a `AppUsageMetrics` manage a collections of `AppUsageData`?