Change from using CouchDB to PostgreSQL

Reasons for changing:
* Out of practice with SQL
* Wanted to try Amazon RDS
* Lack of support of some gems