Re-merge Stephen's refactor to search
Created by: sqs
Diff searches are omitting results that should exist. They are also being nondeterministic.
- https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+types+f:package.json+type:diff shows "No results"
- https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+f:package.json+type:diff sometimes shows results, sometimes it shows "No results"
This appears to have been a recent regression because the query https://sourcegraph.com/search?q=repo:sourcegraph/sourcegraph+http.%28Transport%7CRoundTripper%29+type:diff+author:keegan was returning results 100% reliably at dotGo on 2019 Mar 25. (It was part of our demo path.)