Separation of tokenizing logic from ScalaCodeScanner

To test the tokenizing logic, it was required to separate it from
the scanner because the scanner has dependencies to UI classes
that are not available in a UI-less testing environment.
Add test class for ScalaCodeScanner