Added CBN utility function for use in code to node implementation

This is not used in Dynamo currently but is used by external host for code to node functionality. Adding code 2 node functionality in bits (from local branch) and not all at once so as to make sure it does not break existing stuff and at the same time does not rot as Dynamo source is updated every day. I need to slowly start checking stuff in as my code easily gets out of date really fast given the pace of development in Dynamo.