fix(dirty-checking): handle simultaneous mutations and ref changes

This applies to both maps and lists/iterables.

Consider the case when one is watching an expression, say, `items`, that
evaluates a list.  Now consider the case when one both mutates that
list and also updates `items` to point to a different list.  In this
case, the reported changes should be between the earlier observed
collection and the newly observed collection.  The previous
implementation is buggy.  It first observes that the original list was
mutated and then observes that the reference to the list was updated to
a different list.  The changes it reports are the differences between
the mutated list and the new list which is incorrect.

This commit fixes the bug by noticing the case when both a mutation of
the previously tracked sequence and a ref change occurs and resets the
change record to undo the recording of the mutation.