lmdb: be sure to abort pending transactions in the correct order.
If the LMDBBackend destructor is invoked while there are still pending
transactions, these need to be aborted, but in the reverse order of
their creation (i.e. abort the innermost transaction first).
The default destructor would abort them in a class field
declaration-dependent order, which may not match the actual cinematic.
We now remember which transaction is the innermost one, so that we can
abort them in the expected order.
This gets rid of "double free or corruption (top)" aborts with glibc,
and Address Sanitizer errors.