I've upgraded DbHandler to support log and query. This breaks
compatibility with older log requests, but is more extensible. We still
need to do something about records maybe or maybe not. The query system
allows Locations to maybe be sufficient standing alone as records, at
least for now.