Add reusable WindowDecorViewHosts with a pool-backed supplier

Adds a ReusableWindowDecorViewHosts that allows swapping entire View
hierarchies (such as when a task is changing from fullscreen<->freeform
and thus the App Handle needs to change to an App Header or viceversa).
It also allows pre-warming it to avoid creation latency during
transition (where window decorations are usually created).
To manage their reusability, the new PooledWindowDecorViewHostSupplier
handles acquiring/releasing them into a SynchronizedPool, with an
initial max capacity set to be equal to the max # of desktop windows
allowed in the system.

The preWarmSize of 2 was selected as it is the maximum number of
simultaneous decorations that may be created at once after a fresh
system start (launching a split-pair that requires two App Handles).

Bug: 360452034
Flag: com.android.window.flags.enable_desktop_windowing_scvh_cache
Test: atest WMShellUnitTests
Test: in perfetto trace, launching the first two desktop tasks reduces
transition latency by about 5ms for each task, and closing/re-opening
windows remains low latency when acquiring pooled view hosts.

Change-Id: I08111bfd4728e5223ed078916255313b13a4093f
11 files changed