Migrate search from mysql3 to sqlalchemy3

This is being done because the search query parser produces generic sql that in most cases will work for anything that suports sql, so may as well make it available. Those features which are not generic (such as fulltext searching and `near:<lat>,<lon>`) are guarded by config or class attributes.

A quick review by @pads or @FND would be awesome.