WL#2057: Small optimisation of Scan and removal of dead code

Status: In-Progress

Scans release locks one at a time. This could be very much optimised
to release a batch at a time.

LQH contains code for a complex variant that is not possible to use
from the API

TC contains a memory leak that can happen in node failures.