Test and refactor Event#search.

Test and refactor SQL search engine implementation of Event#search. This lays the groundwork for eventual object extraction.
Ah, that is better! I wasn't happy about needing to specify the start time here.