fix #12242: delete bad annotation links and annotations

Deletes inter-group annotation links and deletes annotations with a bad discriminator string as described in http://trac.openmicroscopy.org.uk/ome/ticket/12242.