SF - plumbing game mode for metrics (Part 1)

This change adds a game mode in the Layer metadata that gets updated every
time a game app comes to the foreground. The gameMode is then set on the
Layer based on the metadata and reparenting.

The game mode will then be
updated in TimeStats as a dimension (Part 2, in a separate CL later).

Bug: 186025682
Test: libsurfaceflinger_unittest:GameModeTest

Change-Id: I09deffc01d1b318cc08d0475611289dec055c190
8 files changed