Hook up shell transit to metrics and interleave abort with merge

Hooks up shell transitions to the activitymetricslogger and proto
state for app-transitions.

Also fixes interleaving of transition abort and merge.

Bug: 183993924
Test: atest ActivityMetricsLoggerTests
Change-Id: I0ecee0cc23093d00a83e0c8b0ce2c0b9a8ce7aff
8 files changed