Fix deSpinBarrier deadlock.
Detaching a thread from deSpinBarrier caused a race with spin barrier's
triggering thread (last thread: atomicInc(numEntered) == numThreads)
detection test. If numThreads was decremented during the triggering
thread test, another thread would also be classidfied as a trigger to
release the barrier.
Multiple concurrent "trigger" threads caused the spinbarrier state to
become corrupted.
This CL uses a cached numThreads value in trigger test which removes
the race with currently running trigger thread. This also removes
unnecessary m_numLeaving modifications.
Change-Id: Ibfb3d4925fbe3063c982440a555b8aa131544465