Added ScriptNode::currentActionStage() method.

This can be used from slots to determine if the current events are an original, or a replay via the undo() or redo() methods.
Fixed InputGenerator node deletion bugs.

Formerly the InputGenerator would perform its work any time an input changed, even when the input was changing because of an undo or redo event. This created problems where it would attempt to remove the same plug twice - these are documented in the GraphComponent.cpp changes where problems are now detected and reported.

The problem is fixed by only making the changes when the original event occurs, and relying on the undo system to track and undo/redo the changes automatically from there on.