Add the notion of a timestamp column to the config
Move query functions into a separate file

The core file was getting pretty hard to navigate with so much
interleaved logic of different concerns.

query.go still defines a few functions on FactTable.
Split query tests apart from the others