Discard MT when the image is deleted (see #9741)

Make sure the measurement tool is discarded when the image is deleted
see https://trac.openmicroscopy.org.uk/ome/ticket/9741

To test:
 * open an image
 * open the MT
 * Go back to data manager and delete the image
 * The viewer and MT should be discarded.