trace_processor: fix multiple bugs with filtering and casting

When comparision against doubles was attempted to be fixed in aosp/821500,
we accidentally broke comparision of integers vs integers. Moreover,
by casting doubles to integers, we were losing precision in our
comparisions. This caused 119496959 which led to bugs in the timeline.

Fix these issues by choosing more carefully which type we want to
compare in - compare as integers if both the sqlite value and the value
in the table are integers. Otherwise, convert both to doubles and
compare there.

Also fix a minor bug where sqlite_value_int was used for int64 types.

Bug: 119496959
Change-Id: I6369abed91b9c97f58ec7da3f314d1ebbacdbab4
diff --git a/test/trace_processor/index b/test/trace_processor/index
index ea24c2d..81dbe9f 100644
--- a/test/trace_processor/index
+++ b/test/trace_processor/index
@@ -5,6 +5,7 @@
 ../data/android_sched_and_ps.pb slice_span_join_b118665515.sql android_sched_and_ps_slice_span_join_b118665515.out
 ../data/android_sched_and_ps.pb b119301023.sql android_sched_and_ps_b119301023.out
 ../data/android_sched_and_ps.pb stats.sql android_sched_and_ps_stats.out
+../data/android_sched_and_ps.pb b119496959.sql android_sched_and_ps_b119496959.out
 synth_1.py smoke.sql synth_1_smoke.out
 synth_1.py filter_sched.sql synth_1_filter_sched.out
 synth_1.py filter_counters.sql synth_1_filter_counters.out