Make lmdb recreate a file if it has an invalid format

In response to https://cfengine.com/dev/issues/5486

LMDB is not as fragile as TCDB so this possibility can arise only when an external source has tampered with the DB file