grep: extract main search loop as searcher method
Still displayer part is in commands.grep(), the core grep logic is now
reusable. I'll revisit the displayer stuff later since it will be another
long series.
#
# Avoid interference from actual test env:
unset HGTEST_JOBS
unset HGTEST_TIMEOUT
unset HGTEST_PORT
unset HGTEST_SHELL