fixed asset search query.

moved location_to_son to LocationBase.py.
@dmitchell reviewed a previous PR of this against the wrong branch.
@cpennington please merge into opaque-keys.