If necessary, re-create game session when game task is focused.

This change is needed because the game session may have been
destroyed when the game task was put in the background by pressing
the back button, but not re-created when the game task was
restrored via the Recents UI.

Because looking up RunningTaskInfo and checking for game
classification may be too expensive when run every time a
task (game or otherwise) is focused, also introduce an LRU
cache for game task info.

Bug: 227364480
Test: Manual testing
Change-Id: I49b310e50287cc898172ddee3c3f3b0e98176a12
5 files changed