Report problems better when LegacyInjector.preinit() failed in tests

Before this change, one would only see that there was an Exception
in an initializer, but the cause was inconveniently hidden from
the console.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make sure that LegacyInjector.preinit() is run in the unit tests

The order in which Maven runs unit tests is determined by the mtime
of the .class files. Therefore we cannot rely on any order in which
the tests might be run, and have to make sure that the LegacyInjector
gets a chance to run before any test uses ImageJ 1.x classes.

This is a little tricker in the FatJarTest because we reuse that class
to be loaded in the encapsulated environment, without LegacyInjector
in the class path. The trick is to catch a NoClassDefFoundError,
ignore it and let the other unit tests catch when something is wrong
with the LegacyInjector's preinit() functionality itself.

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