search: remove ad-hoc Empty check
Created by: rvantonder
Stacked on https://github.com/sourcegraph/sourcegraph/pull/22940.
There is inline logic to check whether a pattern is "empty". What this is really checking is that the absence of a pattern and file patterns returns no results, when we run a text search. Removing this naively breaks things.
This PR promotes this logic and removes the inline check.