Changes and fixes on the Scanner to make it more usable:
- Report the location of comments correctly, when the scanner is created with "skipComments = false"
- In case of syntax error, do not report an empty range and skip to the next token.
- Make the scanner and related types serializable, so that the state of the scanner can be captured and then restored later (assuming that the TextReader is also serializable).