Test and refactor Event#search.

Test and refactor SQL search engine implementation of Event#search. This lays the groundwork for eventual object extraction.
I've pushed a new commit with this, btw.