Clean up source in LegacyHooks

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a new method to LegacyHooks intended to handle far .jar files

ImageJ 1.x' PluginClassLoader operates under the assumption that it will
find the correct class versions no matter how the .jar files are
ordered. Sadly, this is not true: in Fiji, there is a batik.jar with
completely obsolete XML classes, possibly interfering with xalan.jar
which brings up-to-date versions.

To help things, we patch some sane logic into ImageJ 1.x, and this
commit adds the legacy hook that will be called starting with the next
commit changing the LegacyInjector to make use of this method.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Provide an extension point for reordering plugin classpath elements

ImageJ 1.x' PluginClassLoader operates under the assumption that it will
find the correct class versions no matter how the .jar files are
ordered. Sadly, this is not true: in Fiji, there is a batik.jar with
completely obsolete XML classes, possibly interfering with xalan.jar
which brings up-to-date versions.

To help things, we patch some sane logic into ImageJ 1.x, and this
commit uses the legacy hook that was just added to this end.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add test to ensure that batik is 'demoted' to the end of the classpath

ImageJ 1.x' PluginClassLoader operates under the assumption that it will
find the correct class versions no matter how the .jar files are
ordered. Sadly, this is not true: in Fiji, there is a batik.jar with
completely obsolete XML classes, possibly interfering with xalan.jar
which brings up-to-date versions.

To help things, we patch some sane logic into ImageJ 1.x, and this
commit adds the unit test to ensure that this support does not get
broken randomly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>