Fix pg_isready to handle conninfo properly.

pg_isready displays the host name and the port number that it uses to connect
to the server. So far, pg_isready didn't use the conninfo specified in -d option
for calculating those host name and port number. This can lead to wrong display
to a user. This commit changes pg_isready so that it uses the conninfo for that
calculation.

Original patch by Phil Sorber, modified by me.
Merge branch 'master' of /home/kgrittn/pg/postgresql into matview
Refine "diff" query for REFRESH matview CONCURRENTLY.

Use the right equality operator for the data type, carry just the
ctid of the old row instead of its content, and order by ctid to
make subsequent processing faster.