cros: Correctly record AppListShowSource home button in tablet mode

This change ensures that the home button is not recorded as showing the
app list multiple times once the app list is already shown. Also correctly
records app list shown during transitions between tablet mode and
clamshell mode.

Tests have also been added to ensure that the AppListShowSource metric
is recorded correctly for the fixed cases.

Bug: 1013790
Change-Id: I67bb0f1de8b6bd20c03fd6ac586095d92255119b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869123
Commit-Queue: Matthew Mourgos <[email protected]>
Reviewed-by: Alex Newcomer <[email protected]>
Reviewed-by: Manu Cornet <[email protected]>
Cr-Commit-Position: refs/heads/master@{#709677}
6 files changed