[flexiglass] Apply user actions for the top content (overlay or scene).

We consider only the top-most content (by z-index order) to be "active"
for the purpose of mapping user actions to user action results.

Bonus 1: Use LinkedHashMap when creating the mappings "sortedSceneByKey"
and "sortedOverlayByKey", in order to have an explicitly guaranteed
iteration order on which STL relies.

Bonus 2: Activate overlays when they're added to STL.

Bug: 359173565
Bug: 356596436
Flag: com.android.systemui.scene_container
Test: Added unit tests.
Test: Existing unit tests still pass.
Change-Id: Ie0c6452d2842606bd015c860da8684f26243f00f
5 files changed