update to lmdb upstream
fix freebsd support
Making txn/commit idempotent