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/Android.bp b/Android.bp
index 9ccb7eb..8a85fb7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -63,6 +63,7 @@
     ":perfetto_include_perfetto_profiling_normalize",
     ":perfetto_include_perfetto_protozero_protozero",
     ":perfetto_include_perfetto_tracing_core_core",
+    ":perfetto_include_perfetto_tracing_core_forward_decls",
     ":perfetto_include_perfetto_tracing_tracing",
     ":perfetto_protos_perfetto_common_cpp_gen",
     ":perfetto_protos_perfetto_common_lite_gen",
@@ -272,6 +273,7 @@
     ":perfetto_include_perfetto_protozero_protozero",
     ":perfetto_include_perfetto_public_public",
     ":perfetto_include_perfetto_tracing_core_core",
+    ":perfetto_include_perfetto_tracing_core_forward_decls",
     ":perfetto_include_perfetto_tracing_tracing",
     ":perfetto_protos_perfetto_common_cpp_gen",
     ":perfetto_protos_perfetto_common_lite_gen",
@@ -460,6 +462,7 @@
     ":perfetto_include_perfetto_ext_tracing_ipc_ipc",
     ":perfetto_include_perfetto_protozero_protozero",
     ":perfetto_include_perfetto_tracing_core_core",
+    ":perfetto_include_perfetto_tracing_core_forward_decls",
     ":perfetto_include_perfetto_tracing_tracing",
     ":perfetto_protos_perfetto_common_cpp_gen",
     ":perfetto_protos_perfetto_common_lite_gen",
@@ -647,6 +650,7 @@
     ":perfetto_include_perfetto_ext_tracing_ipc_ipc",
     ":perfetto_include_perfetto_protozero_protozero",
     ":perfetto_include_perfetto_tracing_core_core",
+    ":perfetto_include_perfetto_tracing_core_forward_decls",
     ":perfetto_include_perfetto_tracing_tracing",
     ":perfetto_protos_perfetto_common_cpp_gen",
     ":perfetto_protos_perfetto_common_lite_gen",
@@ -886,6 +890,11 @@
   name: "perfetto_include_perfetto_tracing_core_core",
 }
 
+// GN: //include/perfetto/tracing/core:forward_decls
+filegroup {
+  name: "perfetto_include_perfetto_tracing_core_forward_decls",
+}
+
 // GN: //include/perfetto/tracing:tracing
 filegroup {
   name: "perfetto_include_perfetto_tracing_tracing",
@@ -905,6 +914,7 @@
     ":perfetto_include_perfetto_profiling_normalize",
     ":perfetto_include_perfetto_protozero_protozero",
     ":perfetto_include_perfetto_tracing_core_core",
+    ":perfetto_include_perfetto_tracing_core_forward_decls",
     ":perfetto_include_perfetto_tracing_tracing",
     ":perfetto_protos_perfetto_common_cpp_gen",
     ":perfetto_protos_perfetto_common_lite_gen",
@@ -4516,6 +4526,7 @@
     "src/protozero/scattered_stream_null_delegate.cc",
     "src/protozero/scattered_stream_writer.cc",
     "src/protozero/static_buffer.cc",
+    "src/protozero/virtual_destructors.cc",
   ],
 }
 
@@ -5498,6 +5509,7 @@
     ":perfetto_include_perfetto_trace_processor_storage",
     ":perfetto_include_perfetto_trace_processor_trace_processor",
     ":perfetto_include_perfetto_tracing_core_core",
+    ":perfetto_include_perfetto_tracing_core_forward_decls",
     ":perfetto_include_perfetto_tracing_tracing",
     ":perfetto_protos_perfetto_common_cpp_gen",
     ":perfetto_protos_perfetto_common_lite_gen",
@@ -6075,6 +6087,7 @@
     ":perfetto_include_perfetto_ext_tracing_ipc_ipc",
     ":perfetto_include_perfetto_protozero_protozero",
     ":perfetto_include_perfetto_tracing_core_core",
+    ":perfetto_include_perfetto_tracing_core_forward_decls",
     ":perfetto_include_perfetto_tracing_tracing",
     ":perfetto_protos_perfetto_common_cpp_gen",
     ":perfetto_protos_perfetto_common_lite_gen",