re-add query reduction and add a couple of tests
Created by: camdencheek
When I converted commit/diff search to a job, the query reduction step got lost in a merge. This re-adds that and adds a couple of tests that should help catch that.
I was very concerned that performance wasn't looking any better on
sourcegraph.com until I realized what happened