fix(change-detection): remove memory leak, use iterator

When the change detection finds change it creates a
linked list of records which have changed. The linked
list is not bound to groups but rather crosses groups,
this implies that if we remove a group it is possible that
a record in a live group retains a pointer to a
record in the now deleted record. While technically
not a leak, the memory will not be realized until that
record detects another change and gets re-added to the
dirty list. If the record never fires than the
memory is retained forever.