ITS#7968: add locking into syncrepl.

Mutex must be held even for a read-access of a cookie state,
as there may be a race with write in other thread.
mdb-backend: logging
lmdb: more usefull info from mdb_stat tool.
lmdb: ITS#7974 get a lag of the reading for dreamcatcher.
lmdb: lock meta-pages in writemap-mode to avoid unordered write.

Without locking the meta-pages may be writen by OS before data pages,
in this case database would be inconsistent.
back-mdb: checkpoint-interval in seconds instead of minutes.
lmdb: auto-sync with kbytes threshold (aka checkpoint by kbytes).
back-mdb: support for "checkpoint kbytes" config-option.
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().
slapd: ITS#7974 dreamcatcher feature.
slapd: refine ITS#7974 dreamcatcher feature.

Fixed SIGSEGV
0  __memcpy_sse2_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-sse2-unaligned.S:116
1  0x00000000004aee11 in memcpy (__len=<optimised out>, __src=<optimised out>, __dest=<optimised out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:51
2  mdb_search (op=0x7f16b4ffa7c0, rs=0x7f16b4e697b0) at search.c:993
3  0x000000000048a52a in overlay_op_walk (op=op@entry=0x7f16b4ffa7c0, rs=0x7f16b4ff9c40, which=op_search, oi=0xc31a30, on=<optimised out>) at backover.c:676
4  0x000000000048a681 in over_op_func (op=0x7f16b4ffa7c0, rs=<optimised out>, which=<optimised out>) at backover.c:729
5  0x000000000047de37 in syncrepl_del_nonpresent (op=0x7f16b4ffa7c0, si=0xc31490, uuids=<optimised out>, m=3, sc=<optimised out>, sc=<optimised out>) at syncrepl.c:3400
6  0x0000000000481a0e in do_syncrep2 (op=0x7f16b4ffa7c0, si=0xc31490) at syncrepl.c:1346
7  0x00000000004839e3 in do_syncrepl (ctx=<optimised out>, arg=0xc319d0) at syncrepl.c:1550
8  0x00007f170283ecf2 in ldap_int_thread_pool_wrapper (xpool=0xbe4090) at tpool.c:688
lmdb: ITS#7974 oomkiller feature.
slapd: ITS#7974 oomkiller feature.
lmdb: MDB_LIFORECLAIM & MDB_COALESCE modes.

Reclaim FreeDB in LIFO order - this is a main feature.
Also aim to coalesce small FreeDFB records.
lmdb-backend: support config for 'lifo' and 'coalesce' envflags.
lmdb: refine lifo freelist_save().
lmdb: care of mt_lifo_reclaimed for shared me_txn0.
back-mdb: stack backtrace on SIGSEGV and friends.
back-mdb: stack backtrace enabled only if symbols available.
syncrepl: ANY-logging for delete-ops.