Current metadata printing with either the -b, -H, and -n flags suffers
from a couple of flaws:
1.) -b/offset printing is currently broken when used in conjunction with -o
2.) With -o, bsdgrep does not currently print metadata for every match/line, just the first match of a line
3.) None of this is tested, so the above two were caught in testing for D10577
So we address these issues by making sure we output this data per-match if the -o flag is specified,
and prior to outputting any matches if -o but not --color, since --color alone will not generate
a new line of output for every iteration over the matches.
To correct -b output, we go ahead and fudge the line offset as we're printing matches. This
can be justified in that we're printing metadata for the line at a given point, rather
than the whole line, so we commandeer the pc->ln.off to indicate where in the line
we're currently printing.
While here, make sure we're using grep_printline in -A context so that we don't
accidentally botch that somehow. Context printing should explicitly *never* look
at the parsing context, just the line.
The tests included do not pass with gnugrep in base due to it exhibiting similar
quirky behavior that bsdgrep previously exhibited.
struct members also got realigned here, since I was adding member to indicate how
many times printline() has been invoked on a given line.