Do not dirty records which are part of a relationship change if the inverse is not set

Previously we relied on the fact that in a ManyToNone and OneToNone relationship
only one record would be set in a relationship change object. That was recently changed
to support the syncHashes method. Now we need to explicitly check to see whether the
inverse was set before notifying the property change.