fix bugs in newlock scheme for hashtable and AVL tree: missing key
extraction and lost information in replacement cases.
add ticketing system to lock-internal queues to restore correctness.
performance of this patch is bad, and has to be addressed.