Attempt to precompile assets on Heroku.

Ensure initialisers will work when environment variables are not present, as Heroku does not make environment variables available during asset compilation.
Switch to using postgres for development and test databases.
Attempt to fix asset precompilation on Heroku by fixing the dummy DATABASE_URL passed by Heroku to the sprockets-rails Rake task (rake assets:precompile).
Fix typo
Support simple JSON API for instances.