zoekt: assume all repos are indexed for pre-allocation
Created by: keegancsmith
As an optimization we set the capacity for the list of indexed repositories to search. We estimate that capacity via first looping over the list of repositories to search. However, in multi branch search the heuristic is not accurate. Additionally the common case is that when the list of repos to search is large, we are doing an indexed search. So we can simplify and just always set the cap to the max size.
Note: This also removes the early exit if we are not searching HEAD. This heuristic doesn't work in multi-branch cases and also skips other times we could use zoekt (rev is HEAD or an indexed commit). This does mean we will always rely on ListAll working. We assume it always works anyways for normal searches (and it is has some well tested logic around caching to avoid error conditions).
A follow-up PR will extend the logic to handle selectings other indexed revisions.
Part of #6728