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.
Does this work correctly for escaped newlines in the string?