Added TestScanner ctor that takes a JavaCompiler.

In the NB plugin we need to load JavaCompiler in a special way
because dependency hell.