Move the headless legacy code from Fiji to ImageJ2

It is in general a very hard problem to let code run headlessly that
relies on GUI classes.

In Fiji (actually, before that, in ImageJA), we started to support that by
replacing GUI classes by non-GUI classes so that ImageJ could run without
a graphical desktop.

Later, we converted that code to use Javassist for easier maintenance.

Now, let's add unit tests to ensure a certain level of reliability of the
legacy headless mode; it will never be a 100% complete, but hopefully good
enough for many applications. For those where the legacy headless mode is
not good enough, there is simply no good excuse: they need to be ported to
leverage the ImageJ2 architecture.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add unit tests for the legacy headless support

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Improve LegacyHeadless' javadoc

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