Protect all access to mutable data in LMDB private handle.

With the current code, two threads performing transactions at the
same time are likely to modify the shared data structure behind each
other's back, leading to race conditions and ultimately data corruption.