Silence some clang warnings
Plug leak in 4d02c741b120786df1b87ee9ed49c1d3f9bc7522

Free writer txn on env_close
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
ITS#7942
ITS#7942 tweak previous commit

Only free when cleaning up operation controls, not response controls.
(This only makes a difference on search requests, which may have
multiple responses with the same set of controls.)
ITS#7943 reinit txn flags

When reusing the main write txn
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
 TRIVIA - lmdb: clean testdb-dir while "make test".
 EXTENSION - lmdb: more usefull info from mdb_stat tool.
 CHANGE - lmdb-backend: checkpoint-interval in seconds instead of minutes.
 FEATURE - lmdb: implementation of "checkpoint kbytes".

 Force flush when volume of the changes reached a configurable threshold.
 FEATURE - lmdb-backend: support for "checkpoint kbytes" config-option.
 BUG FIX - lmdb: properly sync meta-pages in mdb_sync_env().

 Meta-pages may be updated during data-syncing in mdb_sync_env(),
 in this case database would be inconsistent.

 Check-and-retry if lead txn-id changed during flushing data in mdb_sync_env().
 FEATURE - lmdb: MDB_LIFORECLAIM & MDB_COALESCE modes.

 Reclaim FreeDB in LIFO order - this is a main feature.
 Also aim to coalesce small FreeDFB records.
 FEATURE - lmdb-backend: support config for 'lifo' and 'coalesce' envflags.
 BUG FIX - lmdb: 'volatile' to important fields, which
           may be updated by readers asynchronously.

 Without 'volatile' compiler may eliminate a mdb_find_oldest() calls.
 BUG FIX - lmdb: reordering of instructions which update the txn in a meta-page.

 Without "volatile" or memory-barrier compiler may reorder instructions
 for update the "mm_txnid" field in meta-page in "writemap" mode.

 From the reader's point of view this cause a short
 time interval when the transaction is corrupted.
 BUG FIX - lmdb: lock meta-pages in writemap-mode to avoid unexpected write,
           before the data pages would be synchronized.

 Without locking the meta-pages may be writen by OS before other data,
 in this case database would be inconsistent.
 EXTENSION - lmdb-backend: stack backtrace on SIGSEGV and friends (optional).
 HOTFIX: LIFO update for Yota (draft #2).