Allow to specify PostgreSQL connection params as database url

Database url format is a common way of representing connection params in PaaS computing services like Heroku where service configuration is exposed via OS environment variables.

The database url can be specified directly or point to env $DATABASE_URL variable, which goes in line with [12factor](http://12factor.net/config) approach.

In my humble opinion it would be great if other backends were also configurable using env variables or command params, which would simplify deployment on Heroku and other platforms.

Also the db structure is now synchronized upon connection.