try to use a UNIX Socket connection if host is localhost

This allows to avoid using the PGPASSWORD environment variable
or a .pgpass file if ident / peer authentication is supported
Merge pull request #24 from gurneyalex/pg_auth_ident

try to use a UNIX Socket connection if host is localhost