Rework locking/queuing to be more correct.

Signed-off-by: Marcus Watts <mdw@cohortfs.com>