Sqlite

This seems pretty reasonable now. There are some commits outside of the SQL stuff that you might want to have a look over. Some changes were required to be SQL-compatible and/or because it different than how ActiveRecord works. Let me know if you think any of that is important.