Add a MacOSX-specific event consumer for the legacy mode

Unfortunately, ImageJ 1.x' MacAdapter uses a deprecated method to
subscribe to the MacOSX-specific events that is incompatible with
ImageJ2's (non-deprecated) method.

Therefore, we need to override the MacAdapter. Let's do that in the
ImageJ2 way, by subscribing to the application events offered by
SciJava's event service.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Refactor LegacyInjector#setLegacyService context discovery

This will allow us to use the context to subscribe to specific events in
legacy mode.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Subscribe to SciJava's MacOSX-specific events in legacy mode

...and override the ImageJ 1.x' MacAdapter (which uses a deprecated
method to register a MacOSX-specific event handler that is incompatible
with ImageJ2's method).

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