Add an interactive test for the legacy mode

This new test lets you start up ImageJ2 in legacy mode, for interactive
playing around and testing. You can execute it with

	mvn exec:java -Dexec.mainClass=imagej.legacy.TestDrive \
		-Dexec.classpathScope=test

or in Eclipse

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Fix tyop in Javadoc

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Use ImageJ2 logo in legacy mode

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

Create a new ImageJ2 UserInterface implementation: the LegacyUI.

This UI acts as a bridge between ImageJ2 and ImageJ1 - it will only be
active when there is an active ImageJ instance.

The intent of this UI is to handle the display of ImageJ2 command output
via ImageJ1, and to facilitate ImageJ2 commands operating on ImageJ1
structures (such as outputting ImagePluses).
Create ActiveImagePlusPreprocessor

Provides a method to harvest ImagePlus @Parameter inputs.
Create LegacyCompatibleCommand

Adds a marker class for IJ2 commands that should also be added to the
IJ1 menu when in legacy mode.
Create LegacyStatusBar

Adds an ImageJ2 adapter for the ImageJ1 status bar.
Create LegacyDialogPrompt

Adds an ImageJ2 adaptor for the ImageJ1 dialog prompt.
Create LegacyToolbar

Adds an ImageJ2 adaptor for the ImageJ1 toolbar.
Create LegacyApplicationFrame

Adds and ImageJ2 adaptor for the ImageJ1 application frame (that is, the
actual IJ window).
Legacy UI: refactor to encapsulate IJ imports

Refactored all legacy UI classes so that they will not explicitly import
ij.* classes.

The intent is to keep these classes encapsulated in the IJ1Helper.
Correct LegacyDialogPrompt implementation

There were unhandled YES_NO and YES_NO_CANCEL_OPTIONS which were being
missed, and was mistakenly always showing message with cancel before
even checking the message type.
Create infrastructure for displaying ImagePlus

Adds ImagePlusDisplay and ImagePlusDisplayViewer classes and
implementations, and updates the LegacyUI to account for the new
display/viewer.

These are ImageJ2 framework classes that will allow the display of
ImagePlus outputs, via ImageJ1.

With these changes, while running in legacy mode, you should now be able
to run IJ2 plugins that use @Parameter(type = OUTPUT) on an ImagePlus
field and have them displayed properly (via ImagePlus.show).
DefaultLegacyHooks: simplify plugin creation

The PluginService can be used to simplify creation of a plugin from a
PluginInfo.

Noted by ctrueden
DefaultLegacyService: update isLegacyMode check

It was not really accurate to use the legacyMode flag, now that we have
a LegacyUI.

When the LegacyUI is active we may be in "IJ2 mode" but still want the
legacyService.isLegacyMode method to return true.

So now we will check the IJ1Helper instead.
LegacyUI: implement show

Implementation of show that is very similar to that in
AbstractUserInterface.

The main difference is that if the obtained DisplayViewer is an
ImagePlusDisplayViewer, we can just call its view method and be done
without the need to create a display window, etc... as the ImagePlus
will handle it.
Implement LegacyImageDisplayViewer

Adds a new DisplayViewer for rendering ImageJ2 outputs via ImageJ1.
Updates the LegacyUI to account for the new DisplayViewer
implementation.

Currently the LegacyImageDisplayViewer handles Data and Dataset
@Paramter(type = Output) fields. Data is wrapped in an ImagePlus and
displayed in the ImageJ1 framework using ImagePlus.show.

Using this new DisplayViewer, it should now be possible to run ImageJ2
commands with Data and Dataset outputs and have them display properly in
legacy mode.
Update imagej.legacy packages

The imagej.legacy package is now net.imagej.legacy for consistency.
Updated all imports to match the new package structure.
Add a plugin type to intercept ImageJ 1.x' opening images

This plugin type will need to be implemented by all plugins wanting
to have a say how an image is opened.

It is our design to improve on HandleExtraFileTypes; Now developers
can extend ImageJ 1.x' image opening without stepping on each others
toes, badly.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
DefaultLegacyHooks: support LegacyImageOpener plugins

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