Dump offscreen layers in dumpsys and winscope trace

Now that clients can keep layers alive by holding a reference to its handle and clients can also
create layers, we need to an easier way to keep track of layers that are offscreen but not
destroyed. This change keeps track of the calling pid and uid so it is easier to track the creating
process. Since the tracing thread will also read from mOffscreenLayers, we want to protect
access to it with the tracing lock.

Bug:127687760
Test: run dumpsys check for offscreen layers
Test: capture sf trace and check for offscreen layers
Change-Id: I400f33b11b0a4f78f4c35027c457eb56ff12c22e
5 files changed