trace_processor: overhaul comparision in db tables

This CL overhauls comparisions in all the db tables by centralising the
logic of comparing between values into a single file. By doing this, it
is easier to be both internally consistent (as all comparisions should
call through to one of the comparision functions) and consistent with
SQLite (as we can easily audit that the behaviour matches).

We also make SqlValue comparisions consistent with the strongly typed
comparisions which had drifted out of sync after the code to compare
between doubles and longs was added.

Context: go/perfetto-tp-refactor
Bug: 135177627
Change-Id: I1f9131de872128b5a1c3b08592ede99d2a879a70
diff --git a/Android.bp b/Android.bp
index 52d99ef..5078d34 100644
--- a/Android.bp
+++ b/Android.bp
@@ -5645,6 +5645,7 @@
   name: "perfetto_src_trace_processor_db_unittests",
   srcs: [
     "src/trace_processor/db/bit_vector_unittest.cc",
+    "src/trace_processor/db/compare_unittest.cc",
     "src/trace_processor/db/row_map_unittest.cc",
     "src/trace_processor/db/sparse_vector_unittest.cc",
   ],
@@ -5808,7 +5809,6 @@
   name: "perfetto_src_trace_processor_unittests",
   srcs: [
     "src/trace_processor/args_table_unittest.cc",
-    "src/trace_processor/basic_types_unittest.cc",
     "src/trace_processor/clock_tracker_unittest.cc",
     "src/trace_processor/event_tracker_unittest.cc",
     "src/trace_processor/filtered_row_index_unittest.cc",