Validate cross-compiled binaries on the classpath

This pull request groups two different fixes, since both occur in the same file and I didn't want merge conflicts.

* fix NPE when the JDK is missing on the classpath
* validate jars on the classpath with respect to the plugin Scala version

I had to make one semi-controversial change: removed workspace locking while creating markers. We discussed this informally once, and resources do the necessary scheduling already. I needed this change in order to be able to add markers during classpath changes using our `MarkerFactory` (before, those markers were created manually, so no workspace locking was taking place anyway). This is in a separate commit.