Improve AND operand performance
Created by: asdine
This PR changes the way the AND operator is evaluated by reducing the set of files to search into every time we process one operand. For each operand, every result is stored and used to indicate to the search engines which files to look into. Because search engines don't support repo+file search filters (AFAIK), but only files, it is important to intersect every operand result with the previous results to avoid false positives. Also, I tried to find a way to avoid running the query multiple times if it doesn't return enough results but I couldn't find a simple enough solution, so I kept the existing solution.
Fixes #11281