ui: utilise segment forest to improve counter tracks on large traces

This CL introduces the use of the segment forest to significantly speed
up the queries of counter tracks on large traces. Specifically the data
structure is exposed to Typescript via the use of a new "CounterMipmap"
trace processor operator.

Also while I'm here, fix a few subtle issues I found in the rendering
of counter tracks:
1) Don't draw things deep in negative x: this can cause disappearing
   tracks when very very zoomed in
2) Improve perf of counter panels query.
3) Fix some subtle overlap between counter units and the hover line:
   this is pixel peeping but still nice to fix. Specifically, on my
   monitor, I saw the bottom 3/4 pixels overlapping with the top of the
   counter line when the counter was at its maximum.

Change-Id: I603faaccd080f5e5ff07c37462a039e6850803ea
diff --git a/Android.bp b/Android.bp
index 8a4ba32..c66ad4e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12286,6 +12286,7 @@
 filegroup {
     name: "perfetto_src_trace_processor_perfetto_sql_intrinsics_operators_operators",
     srcs: [
+        "src/trace_processor/perfetto_sql/intrinsics/operators/counter_mipmap_operator.cc",
         "src/trace_processor/perfetto_sql/intrinsics/operators/span_join_operator.cc",
         "src/trace_processor/perfetto_sql/intrinsics/operators/window_operator.cc",
     ],