Refactor ProtoLogImpl to support Perfetto tracing with flag better

Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
Bug: 276432490
Test: atest FrameworksServicesTests
Change-Id: If95bfeeaff491ce51b61e34d2f8c22d8b635912d
11 files changed