Added support for queries.
Added automagic storing of foreign keys.
Major record refactoring.
Fixed IdColumn.