vc tracing: refactoring prior perfetto migration

Introduce factory to create polymorphic ViewCapture instances.

Depending on the flag android.tracing.Flags.perfettoViewCaptureTracing(),
the factory instantiates either SettingsAwareViewCapture or PerfettoViewCapture.

Bug: 323166383
Test: presubmit
Flag: N/A
Change-Id: Ifff201a6d09f2af225cb4db78757a241a080091b
3 files changed