Count app launch correctly.

Previously we mis-count each different activity, regardless of the app
it belongs, as one app launch. We should instead count each different
app open, either created, or brought front as a different app launch,
but different tasks created from the same app is considered one launch.

Fixes: 79885137
Test: Manual test
Change-Id: I5b4b8bee9b0ed4aa23a4ea9eefdfa112b6442455
3 files changed