Database hostname

Use `localhost` instead of the system hostname as the default for connecting to Postgres, since the system hostname may resolve to an external IP. Also use `socket.gethostname` instead of an external command.

E.g. You should be able to drop the `dbhost` argument from the following:
`omego db upgrade -vn --serverdir OMERO-TEST --dbname omero --dbuser omero --dbpass omero --dbhost localhost`
What is the rationale for keeping `HOSTNAME` if we default to `localhost`?