database: introduce Cursors
Created by: tsenart
This PR is the first in a series to introduce paginated repository
resolution in search. It introduces a Cursor
and Cursors
types,
which we will use to efficiently paginate through repos.
Having these types makes it easy to pass cursors around, which we will need.
Part of #26995 (closed)