Rewrite LegacyImageMap

Legacy and modern mappings were being conflated, so as to always create
hard references to an ImagePlus - even in legacy mode. These references
would not be cleaned when in legacy mode, resulting in memory leaks.

Also we were not creating displays for ImagePluses created in
LegacyMode, so ImageJ2 commands operating on Datasets were unable to
find them.

What we wanted was, in legacy mode:
* hard references to displays so they aren't GC'd
* Weak references to ImagePluses so they are cleared when the referent is
  closed in IJ 1.x.
* Weak mappings from the ImagePluses to displays, so that when an
  ImagePlus is gc'd its shadowing display is gc'd as well
* registration of the displays in legacy mode, so that the IJ2 framework
  picks up the shadowing display (e.g. for populating @parameter Datasets
  in scripts).

In modern mode:
* hard references to imagepluses so they aren't GC'd
* weak references to displays so they are cleared when the referent is
  closed in IJ2.
* weak mappings of the displays to the imagepluses so when the display
  is removed, the corresponding imageplus is disposed as well

Switching to modern mode is thus be a matter of translating between
these mappings.
Don't register newly translated ImagePluses

The LegacyImageMap uses the ImageTranslator to create ImagePluses.. so
if we turn around and register these images in the LegacyImageMap, we
get an infinite loop.

Updated direct usage of the ImageTranslator to register the created
images as appropriate.
Fix ImagePlus/Display synchronization

We always want to create a shadowing Display for a given ImagePlus, but
we are also shadowing Displays with ImagePluses. Care needs to be taken
so that the appropriate shadowing structures are created and disposed at
appropriate times.

This commit adds safeguards for construction and deletion of Displays
and ImagePluses to avoid potential infinite loops or NPEs due to
recursive instantiation or multiple deletions.