traced_probes: Add ProcessStatsDataSource

ProcessStatsDataSource should be able to write metadata for processes
which are created while a trace is running. To do this it needs to live
as long as the trace does so this change creates a
ProcessStatsDataSource to mirror the Sink and InodeFileMapDataSource
that exist for the ftrace and inode datasources.

This also pulls ProcessStatsDataSource and associated logic into its
own class: ProbesProducer is getting too big. Finally it adds the
boilerplate for testing ProcessStatsDataSource - but no actual tests.
There is some additional work required to add tests (e.g. creating a
fake TraceWriter impl) and that shouldn't block progress on
ProcessStatsDataSource.

Bug: 73058765
Change-Id: I2bf68166711289df081edd4ee3375b6fd77f4bb0
diff --git a/src/traced/probes/BUILD.gn b/src/traced/probes/BUILD.gn
index 2e4ea03..51eb46d 100644
--- a/src/traced/probes/BUILD.gn
+++ b/src/traced/probes/BUILD.gn
@@ -38,5 +38,19 @@
   sources = [
     "probes_producer.cc",
     "probes_producer.h",
+    "process_stats_data_source.cc",
+    "process_stats_data_source.h",
+  ]
+}
+
+source_set("probes_unittests") {
+  testonly = true
+  deps = [
+    ":probes_src",
+    "../../../gn:default_deps",
+    "../../../gn:gtest_deps",
+  ]
+  sources = [
+    "process_stats_data_source_unittest.cc",
   ]
 }