Fix bug in tracking iri to curve mapping

When renaming one instance of a curve to something brand new,
we previously failed to forget its association between the old
IRI and the curve.

This meant we created a duplicate entry with both active:
- oldIri -> curve
- newIri -> curve

One deeper problem is that we don't enforce the fact that a single
curve can only be associated with a single IRI (something like a
BiMultimap woud be great)

Another deeper problem is that we have duplicate information, first in
the iri to curve multimap, and second in the curves themselves.  This
creates a liability where the two sources of info are not consistent
with each other.
WIP: Reduce the information saved in diagram
WIP: tidy code slightly