Grouping working with tests
Make schema initialization idempotent
Move a couple of functions out of generated code

These are non-perf-critical and can be done more easily using
reflect.
Move interval duration to config

All the query tests are working.
Get more of the tests working
Some test cleanup