Bug 982663: collect and transmit app usage metrics

On further thought, I think that maybe we should not "commit" data to the app usage log until the app closes. Then we automatically only send complete app invocation records.  And we don't have the issue of persisting data at the same time that an app is starting.