Speed up can-advance?

Can prevent advancing as soon as a non-deadlocked thread is found.
Uses Longs for locks, since their hashcodes are faster.