Make postgrex respect env vars PGUSER, PGHOST and PGPASS like libpq.

Also has the template0 commit.