Remember if last cursor op was a delete

If so, don't advance cursor on next NEXT. Also, init xcursor
on the next GET_CURRENT.
ITS#7681 fix mdb_cursor_set behaviour for MDB_SET_RANGE
More for 5f6fa8c04204888c4ff7ac6be1868d81ff4410a8

Reset delete flag in cursor_put().
ITS#7682 In mdb_env_copy retry open if O_DIRECT fails
updates
Release 0.9.8
ITS#7701 fix mdb_rebalance

Must copy tmp cursor back to real cursor when merging into tmp cursor.
ITS#7681 fix 18a07eb7c2dc33372455a6040984cd6b699b41a5

Set rc=0 when taking the SET_RANGE branch
ITS#7682 mdb_env_copy(): Avoid Linux O_DIRECT bug.

Use fcntl() to set the flag.  Linux open(,O_DIRECT...) can create
the file even on failure, if the filesystem lacks O_DIRECT support.
Update MDB documentation and comments.
mdb_pages_xkeep(): Reformat, use common flag mask
ITS#7515 mdb_pages_xkeep(): Careful about xcursors.

Don't prod sub-pages or pages referring to uninitialized xcursors.
ITS#7515 Fix mt_dirty_room in nested txns.

Fix description & code: Also ignore dirty pages hidden by
spilled pages, as they won't merge into our dirty_list.
Update it in mdb_page_flush() instead of mdb_page_spill().
ITS#7515 Fix mdb_txn_commit(nested txn with spills).

Catch malloc error.
Fix hunt for dirty vs spilled pages: Don't leave x at a deleted pageno.
Cleanup: Factor out variables, squash pages already marked for deletion.
ITS#7515 Fix mdb_page_unspill() in nested txn.

Malloc a page in this txn, not in a parent.
mdb_page_unspill(): Rename local vars.

The names have caused bugs, "txn" was treated as
the current transaction.
Rename SWAP() to avoid conflict with sqlightning.

Happened since sqlightning #includes mdb.c, midl.c.
Tweak MDB_DEBUG output
Clean up and simplify mdb_page_search().

Only named DBs can have DB_STALE, and they do not use MDB_PS_MODIFY.
Replace magic key values with flags.  Drop duplicated comments at
mdb_page_search_root() vs. mdb_page_search(), and rephrase.
Drop unneeded code.

MDB_txn.mt_toggle: Use (mt_txnid & 1) instead.
Drop error checks which will be repeated.
mdb_cursor_set(): Turn assert into if/return to match the above.
mdb_cursor_del(): 'flags' are now used as bitflags.