Add a unit test ensuring IJ1 is used judiciously

We only want EssentialLegacyHooks and HeadlessGenericDialog to actually
use the ImageJ 1.x classes. All other classes (outside unit tests, of
course) should not access any ImageJ 1.x class in any way because that
would wreak havoc in situations where different ClassLoader instances are
used to load the patcher and ImageJ 1.x.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add missing license header

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