Deprecated ScalaCodeScanner.tokenize(IDocument, Int, Int) incorrectly handled offset in generated tokens.

Also added a test.