(#11331) Fix egrammar lexer error for unclosed quote.

The lexer produces unhelpful error message with garbage for an
unclosed quoted string. 
This improves this error message, as well as message emitted for
unrecognized escapes.

The lexer output for these contains file, line and pos, as well as the 
quote, and a sequence of up to 5 following characters (rather than the
rest of the file as before).

Also handles eof.