ij-legacy: make sure GenericDialogs are disposed in macro mode

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
ij-legacy: make sure NonModalGenericDialogs don't wait forever in macro mode

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
LegacyTestUtils: use better method to construct fresh class loader

We can simply reuse the current class loader's URLs: as we only run
this code in unit tests, we can be sure that this is a URLClassLoader
with local URLs only.

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