SurfaceFlinger: HWVsync when display is off

HWC expects that HWVsync will not be turned on if display if off.
To ensure that we move enabling/disabling of HWVsync to the main thread
and caching the latest request in case the display is off. When the
display is turned on again we apply the latest state of HWVsync.

Bug: 134050982
Test: Toggle screen on/off in a loop
Change-Id: Ib87f885f95195b8bb402d5a5b2c75f20e213d2aa
2 files changed