Query test against rogue-core

Includes a trivial ORM that provides just enough functionality for rogue
to do its thing. Also exposes spots that need to be copied from the lift
adapter, and should probably be in the core code.