Make Heroku compatible.

Replaced sqlite with postgres for production.
Add rails_12factor to gemfile.