After sending cancel req, wait for remote error
Previously, as soon as cancel requests were send,
plproxy re-throwed the error, without waiting for
reaction from backend. Such behaviour creates
2 problems:
- If plproxy backend is closed immediately, the bouncer will
see plproxy close before cancel from backend, thus seeing
mid-tx close, thus dropping the connection.
- If new query comes in to plproxy backend, plproxy itself
will see dirty connection, closing it, thus also causing
close of server connection in bouncer.
In both cases it can cause server connection drop in pooler.
New behaviour of waiting query result should fix it.