tdb2: make tdb1 use same low-level lock functions.