Bug 982663: collect and transmit app usage metrics

This seems tricky... If we are not able to send the data right away, how can we ensure that we don't lose that data in the meantime?  Should we also persist dataToSend?

Before we create dataToSend should we check whether we are online at all?  (Does navigator.onLine work in FirefoxOS?)