This fixes #35172.
CCoinsViewDB::Cursor() primed its cached key by calling GetKey()
on the first database record but ignored its return value. A failed
read leaves entry.key at its default-constructed value of DB_COIN,
which is indistinguishable from a genuinely valid coin key, so
Valid()/GetKey() on the returned cursor incorrectly report success.
This mirrors the same class of bug already fixed in
CCoinsViewDBCursor::Next() (#7890); this PR applies the identical
fix to Cursor()'s priming logic.
Added a regression test (txdb_tests.cpp) reproducing the exact
failure from the issue, confirmed it fails before the fix and passes
after. Ran the full unit test suite (773 test cases) with no
regressions.