Support defining database to connect to.

One might not be allowed to connect to 'postgres' database remotely
(i.e. hba limitations).

Optionally the database to connect to can be read from the environment
variable PGDATABASE. If not set, 'postgres' is used as a default.