Add tests for TrackPointer matching for search queries.

Also, add searchquery.h/cpp which I forgot to add :-/.