squash! Move most of the disableIJ1PluginDirs() handling out of LegacyHooks

TODO: what about a patched .jar?
Fix NullPointerException

This was introduced by the lazy loading...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Ensure that the legacy environment is initialized before setMacroOptions

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
TO-UNDO
fixup! squash! Move most of the disableIJ1PluginDirs() handling out of LegacyHooks
Refactor the callback handling in LegacyInjector

The previous approach was doomed because it was limited to one
callback, and that callback was required as a parameter at injection
time. However, we are likely to want more callbacks, and we are
likely to know whether we want them to be called *way* earlier
than injection time.

So let's restructure the thing: make a list of callbacks to call
before, and a list to call after, applying the runtime patches.

They are still package-local as they are not considered part of the
public API (we might need to refactor them yet another time before
the API stabilizes).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
fixup! Make sure that LegacyHooks' fields are retained when installing new ones
fixup! squash! Move most of the disableIJ1PluginDirs() handling out of LegacyHooks
Do not access LegacyHooks._pluginClasspath directly

We are about to make this field private, to prevent direct
usage of that field. Instead, it should be accessed via the
handleExtraPluginJars() method.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
fixup! Refactor the callback handling in LegacyInjector
wip