Backport infinite loop detection
Upstream fix https://github.com/rabbitmq/rabbitmq-common/pull/26 (patch
modified to reflect current state of upstream code).
Sudden death of cluster node could result in a stuck queue process -
this will result in redeclare attempts to hang. With this patch such
condition will be detected - AMQP channel will be closed and error will
be logged. And probably it could help us to discover underlying bug, by
localizing it in time.
And for referenced partial bugs it'll allow us to confirm or reject
hypothesis that it's related.
Change-Id: I09df5c5f2333cc462475798260cdfa9f4f5de654
Closes-Bug: #
1515223
(cherry picked from commit
6b45958024465ff64f5466815cf04169da0c9cf5)