QPID-4555: HA Fix race condition in QueueGuard

- If cancelled could delay a message without recording it.
- Make all actions involving the delayed set and the AsyncCompletion atomic.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1441158 13f79535-47bb-0310-9956-ffa450edef68
QPID-4555: HA fix sporadic core dump in BrokerReplicator::disconnected

Unregister as a ConnectionObserver and Exchange at shutdown.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1441160 13f79535-47bb-0310-9956-ffa450edef68
QPID-4555: HA Fix race condition in rejecting connections.

Sporadic failure of test_failover_python was caused by a race in rejecting
connections. There was a very small window where work could be done by a
connection after it was rejected.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1441161 13f79535-47bb-0310-9956-ffa450edef68
QPID-4555: HA fix deletion of self from membership.

It was possible for a membership update to erase a broker it's own membership.
This caused infrequent core dumps while running ha_tests.test_failover_send_receive.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1441162 13f79535-47bb-0310-9956-ffa450edef68
QPID-4555: Fix handling of no-credit consumers in Queue::getNextMessage.

This was discovered while investigating QPID-4555 but could affect any consumer
using bounded credt.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1441163 13f79535-47bb-0310-9956-ffa450edef68