scmutil: move walkchangerevs() from cmdutil
It's no longer a command-level function, but a pure helper to walk revisions
in a windowed way. This change will help eliminate reverse dependency of
revset.py -> grep.py -> cmdutil.py in future patches.
grep: extract public function to register file to be skipped
The main grep loop will be extracted to a searcher method, but this skipping
condition depends on the result of display() function.