Hold a reference to the current LegacyService in ij.IJ itself

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a dummy LegacyService

We would like to be able to run ImageJ 1.x even when patched with
the LegacyInjector, without having to have to test whether there
is a LegacyService or not. To make that happen, let's always have a
LegacyService (even if it does not do anything).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make sure that there is always a LegacyService available in ImageJ 1.x

... even if it is only a DummyLegacyService...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Deprecate imagej.legacy.Utils#isLegacyMode()

Now that we always have a LegacyService, we can ask it directly
whether we're running in legacy mode or not.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Only instantiate a new ImageJ 1.x if there is none yet

This change is needed for Fiji to be able to start in legacy mode
and then to switch to modern mode (just after creating a new Context).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Legacy Service: Do not add commands without a menuPath

We should make such commands available, just be prepared that they
might not have a menuPath.

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