Refactor PerfettoProtoLogImpl classes to take the datasource object directly and be enabled and disabled on demand

This avoid us having to pass a builder function to the class for test,
but also means that we can easily re-create an instance when needed and
pass the same datasource so we don't end up creating and registering a
datasource on each instance creation.

We also now have the ability to easily toggle the protolog tracing on
demand to easily switch between implementation instances when needed.

Flag: android.tracing.perfetto_protolog_tracing
Bug: 369560789
Test: atest TracingTests
Change-Id: I8da7123cbd665d1c289c4c994db181c4de433826
9 files changed