Guarantee that commitReady does not get missed.
Guarantee that commitReady does not get missed.

Checking commitReady inside the lock is subject to a race condition where
the flag is set after the lock owner has checked it but after the setter
has failed to acquire the lock.

Checking it after releasing the lock guarantees one of the following
cases instead:
* Setter A fails to acquire lock and returns. Lock owner B releases lock,
  reacquires lock and commits.
* Setter A fails to acquire lock and returns. Lock owner B releases lock.
  Setter C acquires lock. Lock owner B resets flag and fails to reacquire
  lock. Setter C commits.

I was unable to devise a test case for this, but NCrunch's task runners
were still getting stuck and the debugger turned up some 'impossible'
system state caused by this race. No longer happens after this change.

alex-davidson/Streams.Interleaved