metrics: add typechecking to metric result protos

This CL adds the ability to check the types of fields returned from
SQL proto builder functions to ensure that the generated protos are
well formed. We also set the foundation for proper support for nested
repeated fields here.

Finally, add support for null messages resulting in the proto field
not being set.

Bug: 133300274
Change-Id: I0f0df97215239b05bea7ea534221042f815f95ee
diff --git a/src/trace_processor/metrics/BUILD.gn b/src/trace_processor/metrics/BUILD.gn
index 88ae7fb..d1b0000 100644
--- a/src/trace_processor/metrics/BUILD.gn
+++ b/src/trace_processor/metrics/BUILD.gn
@@ -56,6 +56,7 @@
     "../../../protos/perfetto/common:zero",
     "../../../protos/perfetto/metrics:zero",
     "../../../protos/perfetto/metrics/android:zero",
+    "../../../protos/perfetto/trace_processor:metrics_impl_zero",
     "../../protozero:protozero",
   ]
   public_deps = [