trace_processor: improve best index for thread table
trace_processor: improve best index for thread table

The thread table was relying on only the first constraint to be the utid
constraint but with some joins (e.g.
select sum(dur) from sched join thread using(utid) where upid = 15;),
the constraint on the upid comes first. This caused incorrect BestIndex
cost estimation which made SQLite choose bad subqueries with queries
like this.

Allow any constraint to be on utid to help speed up queries like this.

Change-Id: Ibc3a31cdd7a48a4ee499807e2d21775eb18fd058
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto