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.