Minor refactoring around "CompileCustomNodeDefinition"

Background
-----
This pull request does not add/remove/change any functionality, it refactored ```CompileCustomNodeDefinition``` method, change it from taking ```List<AssociativeNode>``` to taking ```IEnumerable<AssociativeNode>```. As a result of changing that, ```GenerateGraphSyncDataForCustomNode``` is also updated.

This pull request represents minor code restructuring that is required by [a larger change](https://github.com/Benglin/Dynamo/compare/Concurrent) in ```Concurrent branch```. It is meant to break code changes down into smaller pieces.

Unit Testing
-----
I ran the following test cases that heavily rely on these methods, and there is no regression:

```
- Dynamo.Tests.CustomNodeEvaluationViewModel
- Dynamo.Tests.CustomNodes
```

Hi @ke-yu, @Randy-Ma and @aparajit-pratap, whoever gets to this and review first gets to merge this PR, how's that for a prize?