Clear dependencies of a redefined graphnode only after determining the redefinitions

1. Cleanup function
2. Move dependency redefining at a later step
On entry to a function, set it graphnodes to active

1. Set graphnodes of a function to active
2. Remove code that clears the dependents of a redefined graphnodes. It
is sufficient to just mark them inactive
3. Added re-execution test
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into defectfix
simplify loop
Merge branch 'master' of https://github.com/DynamoDS/Dynamo into defectfix
Merge pull request #3297 from junmendoza/defectfix

Set the graphnodes of a function to active on entry