Undefine functions that defined in previous graph updating event

If a SubTree is modified or deleted, then the functions that defined in this SubTree in last graph updating event should be undefined firstly. Test case added.

Related Dynamo pull request: https://github.com/ikeough/Dynamo/pull/947