Implemented perfetto profiling of custom event.

This involved beginning the perfetto trace in background,
triggering custom event, and waiting for perfetto trace to
finish in command_executor.py, and adding new APIs to
interact with the device in device.py. In addition,
added 12 new unit tests to tests/device_unit_test.py,
and added 10 unit tests to new file,
tests/command_executor_unit_test.py. Finally, updated
Android.bp accordingly.

Test: atest device_unit_test, atest command_executor_unit_test
Bug: 355053544
Change-Id: Iab3e4610aa08fa9e97dd376eeadfd63a51eccdfb
5 files changed