search: use query.ForAll in isGlobalSearch decision
Created by: keegancsmith
This refactor make it easier to add more nuanced rules in the future. Additionally I think the function is much easier to read now.
Depends on https://github.com/sourcegraph/sourcegraph/pull/25589