Add/Replace some gem.

* Replace sqlite3 with pg to use PostgreSQL instead of SQLite3.
* Add gems for testing.
Modify database config to use PostgreSQL.
Modify travis config to use PostgreSQL.