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.
Add a missing ')'. This is a typo introduced in commit
2bc8044fdabcd520cf5cc94ba90005bfad8d5072

Per complaint from Carlos Chapi when compiling for a customer.