Fix: MAGN-774 Crash after convert to custom node and undo

Background
==========
This pull request is meant to fix the following defect:

[MAGN-774 Crash after convert to custom node and undo](http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-774)

Prior to this submission, **NodeCollapser.Collapse** has never been recorded for undo-redo. For this reason, the following operations would yield unexpected results (or even crash):

1. Perform some actions (e.g. create node, connections, etc)
2. Select few nodes and convert to custom node (CTRL+D)
3. Undo

The undo operation in Step 3 will result in actions of Step 1 to be undone (as if Step 2 never happened). This will result in crash if Step 2 requires anything from Step 1.

Unit Testing
============
- All the existing test cases are passing with this fix
- I have added **CanCollapseAndUndoRedo** to completely test the fix