Refactored local::mutex to be standard conformant

It is to avoid the queue element from being removed "twice" from the queue. Once a few lines down here, the other during a wait call. The node that is popped from the queue belongs to the waiting thread.

I don't think this is strictly necessary, but it makes the code simpler.