Stop overriding the scijava-common and ij1-patcher versions

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Let's depend on imagej proper

This is needed because we want to hand off to net.imagej.Main.

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

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Use ImageJ2's Main class instead

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Remove code from MenuRefresher that ImageJ2 made obsolete

This includes, most notably, the handling of scripts and macros:
ImageJ2 already puts them into the menu, we do not have to do it
again.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Safe-guard against installing keyboard listeners in headless mode

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Do not override ImageJ2's editor

ImageJ2's editor has a really huge advantage over Fiji's. Well, not
only one, but the biggest one is that ImageJ2's editor does not
have to construct an ImageJ2 context: it simply has it. So it starts
up really snappily.

Other advantages include: full integration into the SciJava stack,
robust development (with continuous integration and all), support
for @-annotated parameters in macros, etc

Therefore it is high time to let Fiji use ImageJ2's editor (which
was developed starting with Fiji's editor source code) at last.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Respect argLine even for integration tests

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Adjust BarePluginsIT to net.imagej.Main

Since ImageJ2 now calls ij1-patcher's noPluginClassLoader(), we have to
make our test a little different.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Let ImageJ2 intercept loading cached sample images

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

This moves Fiji to Fiji2: it uses ImageJ2's main class instead of Fiji's
-- now obsolete -- one. It also fixes the sample loader when we let
ImageJ2 intercept the image loading via SCIFIO. And it paves the way
to finally switch over from Fiji's script editor to the ImageJ2 one.

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