Add integration tests for models

These integration tests require a database connection, but will hopefully prevent bugs like the one fixed in d322d53 from popping up again.
Add integration tests to Travis CI

Originally I liked that Travis didn't have to run the integration tests, but now that there are more of them, I feel it's important.