TrackEvent: Add support for ids, thread and timestamp overrides for legacy events

This patch adds support for recording ids, thread and timestamp overrides with
legacy tracing macros. Note that while we can implement TraceId completely
within the library, threads and timestamps are represented in different ways by
different embedders so we allow these to be constructed from arbitrary types.

Bug: 147743479
Change-Id: I19953a64fae5d991a0b24c8c20d0d86f53ce1485
diff --git a/Android.bp b/Android.bp
index c83a8cb..f50a724 100644
--- a/Android.bp
+++ b/Android.bp
@@ -6521,6 +6521,7 @@
     "src/tracing/tracing.cc",
     "src/tracing/track.cc",
     "src/tracing/track_event_category_registry.cc",
+    "src/tracing/track_event_legacy.cc",
     "src/tracing/virtual_destructors.cc",
   ],
 }