QPID-5275: Segmentation fault in SaslFactory.

Discovered while working on QPID-5275: SecretsMap in SaslFactory.cpp was thread
unsafe, added a mutex.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1541144 13f79535-47bb-0310-9956-ffa450edef68
QPID-5275: Add missing lock to ExchangeRegistry::registerExchange

Discovered while working on QPID-5275: ExchangeRegistry::registerExchange was
not taking the write lock. Caused sporadic core dumps in ha_tests.py,
tx_block_threads.

git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1541145 13f79535-47bb-0310-9956-ffa450edef68
QPID-5275: HA transactions failing in qpid-cluster-benchmark

The test was failing due to incorrect handling of the transaction lifecycle:
- Failing to handle the automatic rollback of the empty TX at session close.
- Deleting the tx-q before all backups were finished with it.

The fixes include
- Make tx-q auto-delete, deleted only when the TxReplicators cancel their subscriptions.
- Use markInUse/releaseFromUse on the primary to keep the tx-q until the primary is done.
- Count TxReplicators for auto-delete (unlike normal QueueReplicators)
- Improved error handling and log messages
- Handle *incoming* exceptions on a federation link by passing to ErrorListener
- QueueReplicator catches incoming not-found and resource-deleted exceptions
  - close the backup bridge, handle race between subscribe and delete.
- Simplify QueueSnapshots, remove need for snapshot map.

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