Master devel

When using LMDB as a backend under the heavy load with add/modify/delete
transactions, a huge number of disk writes is generated.
In generally this patchset give a bonus of 10-100 times write-performance at the
cost of consistency on disk in a one second.

1. Adds a configurable LIFO-policy for reclaiming of FreeDB records.

Thus, only a small subset of pages will be updated and re-written on disk
repetitive. This allow storage subsystem to effective combine such disk writes.
As a result write-performance grow up to 100 times in case of write-back cache
or "writemap" mode.

2. Checkpoints with consistency and a second exactness.

It is possible and very useful the following settings, for example:
  envflags writemap nosync lifo
  checkpoint 0 1

3. Related bugfixes and minor extensions.

--

The attached files is derived from OpenLDAP Software. All of the modifications
to OpenLDAP Software represented in the following patch(es) were developed by
Peter-Service LLC, Moscow, Russia. Peter-Service LLC has not assigned rights
and/or interest in this work to any party. I, Leonid Yuriev am authorized by
Peter-Service LLC, my employer, to release this work under the following terms.

Peter-Service LLC hereby places the following modifications to OpenLDAP Software
(and only these modifications) into the public domain. Hence, these
modifications may be freely used and/or redistributed for any purpose with or
without attribution and/or other notice.