Send down SYNC message to a failed remote session that was running extended
query protocol.
While running extended query protocol, a backend that has thrown an error will
keep ignoring all messages until it sees a SYNC message. We now carefully track
the messages that we are sending to the remote node and remember if we must
send a SYNC message even before sending a ROLLBACK command.
While the regression was running fine even without this patch, this issue was
noticed as part of some other work and hence fixed