LSIF: Handle pagination in a more uniform way.
Created by: efritz
This refactors the handling of pagination in a more uniform way: it creates a cursor for the first page of results so that the same code can be reused whether it's on the first page or a subsequent page.