Non functional refactorings to gen classes

This CL makes a bunch of boring refactorings in the
attempt of making next CLs easier to review. No new
functionality is introduced. Major changes:

- Remove forward declaration to proto-derived core classes
  like TraceConfig. In the next CLs they will be moved to
  a different namespace which will make their forward decls
  trickier.
- Rename the ParseFromRawProto methods to ParseFromString to
  match the libprotobuf api.
- Extract a base class for .gen.h class, it will be used later
  by the IPC layer.

Bug: 132880619
Change-Id: I84f49788677002b07283f6a4602dca511c77dd11
diff --git a/BUILD b/BUILD
index d7c5923..dae81c7 100644
--- a/BUILD
+++ b/BUILD
@@ -149,6 +149,7 @@
         ":include_perfetto_protozero_protozero",
         ":include_perfetto_public_public",
         ":include_perfetto_tracing_core_core",
+        ":include_perfetto_tracing_core_forward_decls",
         ":include_perfetto_tracing_tracing",
     ],
     deps = [
@@ -354,6 +355,7 @@
     srcs = [
         "include/perfetto/protozero/contiguous_memory_range.h",
         "include/perfetto/protozero/copyable_ptr.h",
+        "include/perfetto/protozero/cpp_message_obj.h",
         "include/perfetto/protozero/field.h",
         "include/perfetto/protozero/message.h",
         "include/perfetto/protozero/message_handle.h",
@@ -413,6 +415,14 @@
     ],
 )
 
+# GN target: //include/perfetto/tracing/core:forward_decls
+filegroup(
+    name = "include_perfetto_tracing_core_forward_decls",
+    srcs = [
+        "include/perfetto/tracing/core/forward_decls.h",
+    ],
+)
+
 # GN target: //include/perfetto/tracing:tracing
 filegroup(
     name = "include_perfetto_tracing_tracing",
@@ -555,6 +565,7 @@
         "src/protozero/scattered_stream_null_delegate.cc",
         "src/protozero/scattered_stream_writer.cc",
         "src/protozero/static_buffer.cc",
+        "src/protozero/virtual_destructors.cc",
     ],
 )
 
@@ -2350,6 +2361,7 @@
         ":include_perfetto_ext_tracing_ipc_ipc",
         ":include_perfetto_protozero_protozero",
         ":include_perfetto_tracing_core_core",
+        ":include_perfetto_tracing_core_forward_decls",
         ":include_perfetto_tracing_tracing",
     ],
     visibility = [
@@ -2420,6 +2432,7 @@
         ":include_perfetto_ext_tracing_ipc_ipc",
         ":include_perfetto_protozero_protozero",
         ":include_perfetto_tracing_core_core",
+        ":include_perfetto_tracing_core_forward_decls",
         ":include_perfetto_tracing_tracing",
         ":src_android_internal_headers",
         ":src_android_internal_lazy_library_loader",