Avoid package-local access in LegacyHooks

The idea of using package-local access was to discourage others from
using a method that is intended only for internal use.

The problem is that package-local access does not only require the
caller to be in the same package. Crucially, it also requires the caller
to be loaded *by the same class loader*.

Since the intended use is, however, to have the LegacyHooks be shared
between class loaders, it is inevitable that the class loaders are
almost *definitely* different.

Let's just make it public, but keep the warning that it is only for
internal use only.

This was an oversight in 2dd84197(Refactor the code to deduce a class
path from a ClassLoader) that was only identified when trying to run
imagej-legacy's legacy service using the new ij1-patcher version.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Camel-case 'classpath elements' as two words

... for consistency...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'no-package-local'

This branch fixes a class loader issue introduced by the recent merge of
the support to disable the plugin class loader.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Bump parent version to use scijava-common's TestUtils for testing

SciJava common now offers a TestUtils class that has improved versions
of our own createTemporaryDirectory() methods. Let's use them in our
tests, and get rid of our obsolete versions.

To that end, we bump the parent to the pre-emptively deployed
pom-imagej version that already references the ij1-patcher version
we are just about to release.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Use SciJava common's deleteRecursively() and createTemporaryDirectory()

Those versions are better than our own.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Prepare LegacyInjector.preinit() for the upcoming imagej-legacy

The new imagej-legacy version will change the startup, requiring the
PluginClassLoader to be disabled.

The pom-imagej version we use as our parent currently was already
prepared for the new imagej-legacy version, so let's just sneak this
change into the 'test-utils' branch that already bumps the parent.

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