Sync LMDB code.
Revert removal of POOL_MEM::max_size method.