Make sure mdb_stat() gets valid data
Fix CURSOR_NEXT/PREV on emptied DB
Drop me_pgfree, add mdb_freelist_save().

Split up saving me_pghead, to make me_pgfree unneeded. Also mf_pghead
is now a midl. Needed after e7f6767ea815fe0ada1f95037dfdec176ec4d5bb
("Return fresh overflow pages to current pghead").
Tweak MDB_DEBUG freelist output, make it ascending.
Partial revert c2cac4588a40480c020d320b544bc5f8e72adb11

MDB_NEXT was fine before, duh.
More for ITS#7620 Fix mdb_ovpage_free().

Do not binary-search dirty_list, it is unsorted when MDB_WRITEMAP.
Catch errors. In nested txns, put the page in mt_free_pgs after
all since pages dirty in a parent txn would add complexities.
Don't #define _GNU_SOURCE if already defined.
ITS#7594 Invalidate a dropped MDB DB's cursors.
ITS#7594 Fix MDB cursor tracking with subDBs.

The tracking code should not change the current cursor.
It did when that was a C_SUB cursor, which should not be
checked against the tracked cursors but their xcursors.

However, do not bother to skip the tracking code for the
current cursor when it would not change that cursor anyway.
Clean up mdb_page_touch(), mdb_page_copy().

When copying, round up/down to aligned sizes. Skip the unused portion,
this was not done when touching a page dirty in the parent txn.
No other change in behavior.

Simplify mdb_page_touch(), including: Drop test m3==mc, the condition
is caught below. Don't "modify" the parent's pgno into the same pgno,
when a nested txn copies a parent's page into its freelist.
ITS#7515 Nested MDB txns: Inherit txn flags.

Committing a nested txn lost the MDB_TXN_DIRTY flag
in the parent, unless the child had set it too.