Search backend: tidy up `internal/search/query` package
Created by: camdencheek
Just removes some unused methods/functions and makes some private that aren't used outside the package.
Stacked on https://github.com/sourcegraph/sourcegraph/pull/34780
Test plan
All semantics-preserving. Any issues should be caught statically.