grep: move context hunk mark handling into show_line()

Move last_shown into struct grep_opt, to make it available in
show_line(), and then make the function handle the printing of hunk
marks for context lines in a central place.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff --git a/grep.h b/grep.h
index 464e272..0883214 100644
--- a/grep.h
+++ b/grep.h
@@ -84,6 +84,7 @@
 	int regflags;
 	unsigned pre_context;
 	unsigned post_context;
+	unsigned last_shown;
 };
 
 extern void append_grep_pattern(struct grep_opt *opt, const char *pat, const char *origin, int no, enum grep_pat_token t);