Keep track of unterminated literal expressions.

Also gives the scanner the ability to confirm whether the last token is unterminated, which is useful for the classifier.
Yes, that should be handled by `scanEscapeSequence`.