Commit 3a686b851f8f fixed a dbm_nextkey edge case when using
the function after reaching the end of the database, but it inadvertently
broke the following R_NEXT behaviour:
"If the cursor is not yet set, this is the same as the R_FIRST flag."
Fix this by adding a new cursor constant that allows us to differentiate
between an unset cursor and a cursor that overflowed.
Reported by: ae
Fixes: 3a686b851f8f
Sponsored by: Klara, Inc.