Added experimental type-dependent transaction locking to improve multi-threaded
write performance.