Bug 982663: collect and transmit app usage metrics

It seems to me that first of all, we shouldn't try to send the data if offline.  But if we try and fail, we should merge the data from the failed send with any data that we've collected since then and then try again with a new batch.

If we design an app usage data structure with this kind of merging in mind it should be easy enough to do.