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 $VARIABLE_NAME.