ActiveRecord ORM

This is the new rewritten ORM. It's still WIP, but stable enough to be in the master branch.