POM: bump to pom-imagej 2.49

This updates the version of scijava-common to 2.31.0,
which is needed for the new App API.
Migrate App routines into LegacyImageJApp

This eliminates the LegacyAppEventService, since the AppEventService is
now deprecated in favor of App plugins implementing the relevant
methods. The LegacyImageJApp now has the methods instead, and they have
been simplified in the IJ1Helper to completely delegate to ImageJ 1.x.