fixit: metrics: add support for strongly typed enum fields in metrics

This CL adds the ability to specify enum values by using a string of
their name rather than the integer value. This expands the support added
in aosp/1661905.

We also strengthen type-checking of enum values to make sure they are in
bounds and migrate the 'trace_stats' metric to using enum strings rather
than values.

Change-Id: I7a6ff12b178373c0ddb078ec329ae1050971d621
Bug: 184265484
diff --git a/src/trace_processor/trace_processor_impl.cc b/src/trace_processor/trace_processor_impl.cc
index 68def35..5418f55 100644
--- a/src/trace_processor/trace_processor_impl.cc
+++ b/src/trace_processor/trace_processor_impl.cc
@@ -1033,7 +1033,7 @@
     return util::Status("Root metrics proto descriptor not found");
 
   const auto& root_descriptor = pool_.descriptors()[opt_idx.value()];
-  return metrics::ComputeMetrics(this, metric_names, sql_metrics_,
+  return metrics::ComputeMetrics(this, metric_names, sql_metrics_, pool_,
                                  root_descriptor, metrics_proto);
 }