Maybe sync on slave promotion.
Explain
Port the deadlock-breaking code from bug 25852.
Re-add the log invocations we lost. This does lead to the stale master pid warning getting logged on a different node (the slave node rather than the node that attempted to start the slave) but I doubt we care about that.
Forgot to add a spec
Restore synchronous addition of slaves in the queue.declare case.
*cough*
Improve comment.
More explanation
Merge bug25867
Merge in stable
Merge bug25873
stable to default