ITS#7775 cleanup unnecessary assert()s
Invalidate the txn on corruption/internal errors
Wrap __func__ in mdb_func_
ITS#7377 Invalidate txn on page-allocation errors

This should likely be reverted when all callers handle these errors.
Add mdb_env_<set,get>_userctx()
ITS#7775 Add mdb_env_set_assert()
ITS#7775 Cleanup mdb_node_del()
ITS#7775 Drop <assert.h>, drop/replace assert()s.

db_mid2l_insert(): Move assert to mdb.c.
mdb_cursor_set(): Previous assert cannot fail now.
mdb_cursor_put(): Check mc/key and return EINVAL.
mdb_cursor_dbi(): No error return, so just segfault if cursor==NULL.