FIX: Make DistributedMutex threadsafe (PR #8003)

Since we use the same redis connection in multiple threads, a rogue transaction in another thread can trample the connection state (watched keys) that we need to acquire and release the lock properly.

This is fixed by preventing other threads from using the connection when we are performing these actions.

GitHub

You’ve signed the CLA, danielwaterworth. Thank you! This pull request is ready for review.

Is this good to merge? I know how complex it is to test.