nix: Do not start PG if running
In a nix hook the PG server is started when `nix-shell` is invoked. This
created extra output when nix-shell was invoked on an extra shell as it
tried to start a new PG server again while it was already running.
This change updates the behaviour to not do this, and verify with pg_ctl
if PG is already running.