Add IdAllocator class

It will be used by both SharedMemoryArbiter and tracing::ServiceImpl
to allocate IDs for, respectively, writer IDs and buffer IDs.

Test: perfetto_tests --gtest_filter=IdAllocatorTest.*
Bug: 70284518
Change-Id: Id7cb75fbc256f04515ef24531f8a23cffbfad781
diff --git a/Android.bp b/Android.bp
index 1e7ebef..9ef2dcf 100644
--- a/Android.bp
+++ b/Android.bp
@@ -382,6 +382,8 @@
     "src/tracing/core/chunked_protobuf_input_stream_unittest.cc",
     "src/tracing/core/data_source_config.cc",
     "src/tracing/core/data_source_descriptor.cc",
+    "src/tracing/core/id_allocator.cc",
+    "src/tracing/core/id_allocator_unittest.cc",
     "src/tracing/core/service_impl.cc",
     "src/tracing/core/service_impl_unittest.cc",
     "src/tracing/core/trace_config.cc",