Move clauses from query to filter stage for elasticsearch notes

Merged Nick Thomas requested to merge (removed):1776-fix-elastic-max-clause-count-again into master

What does this MR do?

Move clauses from the query stage to the filter stage, when searching notes with elasticsearch, improving search performance and avoiding a hardcoded limit on clause count.

Are there points in the code the reviewer needs to double check?

I don't know how we can test for this without creating 1025 projects in a spec - and that would be too slow :(

Why was this MR needed?

Previous partial fix solved this problem for issues, but not notes: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1282/diffs

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #1776 (closed)