Improve messages in wait_connection_availability, so we know what
error makes the failover procedure to start

By gripe from Andres Freund
If PQgetCancel() returns NULL we should also return false.

Noted by Andres Freund.