search: compute MaxResults directly from query
Created by: rvantonder
Stacked on https://github.com/sourcegraph/sourcegraph/pull/31126.
This lets us avoid the SearchInput
copy/mutation in toSearchJob
. I'm busy trying to break the resolver dependency for the job creation stuff.
Test plan
Semantics preserving, covered by tests