CodeHacker#verify: print a header

This makes it easier to see the boundaries between subsequent verify()
calls.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
CodeHacker: add the hasSuperclass(String, String) method

We will need this to avoid duplicate headless patching.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
LegacyHeadless: avoid patching multiple times

When ImageJ 1.x is already patched for headless operation, there is
little reason to do it again. Besides, if we do it again, it will
lead to problems because of ClassFormatErrors.

LegacyHeadless#patch() can actually be called multiple times,
e.g. in our test suite when running LegacyHeadlessTest#testHeadless
(which forces headless patching) in a JRE whose GraphicsEnvironment
is headless (hence triggering headless patching again).

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

To support the upcoming headless SaveDialog test.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
LegacyHeadlessTest: add a test for headless SaveDialog instantiations

In the course of debugging

	http://fiji.sc/bugzilla/show_bug.cgi?id=630

it was conjectured that the SaveDialog cannot run in headless mode
without patching. This patch shows, however, that that is not true.

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