Make detection of postmaster working directories more robust.

- avoid a separate pass over /proc for reading stat files
- avoid extra peeks into proc files by starting checks for postmasters
  from the oldest processes.
- use /proc/[pid]/cwd instead of reading /proc/[pid]/cmdline.
  this is more reilable, since cmdline can contain relative paths
- rename the function to get_postmasters_directories to reflect its
  purpose.
New class to parse /proc/net/{tcp,tcp6,unix}.

Add a class to detect which addresses (including unix socket paths)
and ports the given postgres process is listening too by parsing
the socket information from /proc/net/. This would allow us to get rid
of the code that tries to detect 9.0 connection parameters from the
postgresql.conf file, since it's too unreliable.
Add a function to fetch list the socket inodes of a process.

With this, by knowing the pid of a process, we can get all sockets
the process is listening on and get the addresses:ports, which would
allow us to reliably detect connection strings for 9.0 databases.
Last step for the autodetection revamp.

- Run connection string autodetection via the /proc/net method first.
- if the first step fails, try to acquire parameters postmaster.pid.
  This is for the case /proc/net/ files are unavailable due to the
  security policy.
- Actually test whether we can connect to the real database before
  picking a particular connection parameter.
- Retire unix_socket_directory configuration option in favour of host.
- Update README and Changelog, bump up the version number to 1.2
Minor tweaks in how version/dbname detection code works.

- get db major version and name right at the time we check that
  the given directory belongs to PostgreSQL.
- simplify the rules of how dbname is assigned. Basically it's either
  part of pgsql_xxx if there is pgsql_xxx/data or pgsql_xxx/version/data,
  or just the full path to the DB.
Correct the autodetection description.
Detect duplicates among user-supplied database connection options.
Pick only one cluster from the set of duplicates.