Avoid fetching more results than needed in paginated index queries
Avoid fetching more results than needed in paginated index queries

The 'limit' when paginating the source already has 'start' added
to it when query options are converted for index backend. We already
have tests ensuring it. Adding it again to 'limit' will fetch us
more results than we need. These extra results will eventually be
trimmed, but we end-up doing more work than needed.

On a test site with ~25k open changes, query-limit of 50 and ES as
index backend a query like [1], when run with a user (who can't see
most changes) now does 3 index searches and finishes in ~200ms with
this change as opposed to 4 and ~250ms without it. Note that, this
stat also depends on the fact the visible and non-visible changes
are intertwined together.

[1] gerrit query 'status:open' --start 40

Release-Notes: skip
Change-Id: I99bc17d059b06ec0a904cb0c4036ab2ec2f45d23

GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit