color-grep: move regexp compilation outside of loop

The compilation of the regexp is only necessary to do once. This
change saves seconds when reading moderately large files (100k
lines). (What was I thinking when I wrote that initially? Nobody
knows.)