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.