Add ability to trace shell transitions

To allow Flicker as a Service to efficiently and reliably detect the
transitions that are running to run the respective assertions on the
relevant parts of the WM and SF traces.

Test: adb shell cmd window shell tracing start, do some transition, adb shell cmd window shell tracing stop, check dumped proto file

Bug: 230461679

Change-Id: I59026c99787eca53d8e252c9303947c7f999d716
9 files changed