-w flag matching with an empty pattern was generally 'broken', allowing
matches to occur on any line whether or not it actually matches -w criteria.
This one required a good amount of refactoring to address. Basically, procline()
gets altered to *only* process the line and return whether it was a match or not,
necessary to be able to short-circuit the whole function in case of this matchall
flag. We move out the -m flag handling at the same time because it suffers from
the same fate as context handling if we bypass any actual pattern matching.
The matching context (matches, mostly) didn't previously exist outside of procline(),
so we go ahead and create context object for file processing bits to pass around.
grep_printline() was created due to this, for the scenarios where the matches don't
actually matter and we just want to print a line or two, a la flushing the context
queue and no -o or --color specified.
Damage from this broken behavior would have been mitigated by the fact that the
odds are really low that one would depend on empty patterns with the -w flag.
This was spotted while checking PR 105221 for problems that this may cause in
bsdgrep(1), but 105221 is *not* a report of this behavior.