search: factor out args.Mode dep in symbol search
Created by: rvantonder
After force pushing https://github.com/sourcegraph/sourcegraph/pull/26629 it failed backend tests, and I realized there's an issue: removing the args.Mode
mutation in that PR still affects symbol search logic, since symbol search also has the optimized/unoptimized code path. Toldya this stuff is super extra brittle. The only mystery is how I got a green build before getting the red build, but our CI has been flakey so maybe the backend tests were unreliable (shudder).
This PR factors out the args.Mode
dependencies for symbol search, and then I can remove the mutation (so I will rebase that branch on top of this one).