better man page detection, pattern detection

Add a fast grep_q function written in awk to simulate grep -q,
previously replaced with awk invocations.

Check for the ^NAME$ pattern in the first 6 lines of the file and set
ft=man if found. This helps if e.g. using native win32 perldoc on
cygwin, where the parent won't be perldoc since it's a win32 process.
release 1.8.2