Rails4

Add support for rails 4. Fixed `TableDefintion` not having `@base` error and other broken specs. Mostly around ActiveRecord passing in more arguments than before.