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.
crash_reporter.js listens for that event, but I can't find any code that broadcasts it. (or calls setAppName. Maybe crash reporter is broken?) Also, the detail seems to include the app name, but might not include the app origin that we need. Presumably we're also getting crash reports via the crash reporter, so I don't feel strongly about reporting these hard crashes with app usage metrics.

I'd much prefer to be able to report OOMs somehow...