Refactored Action class to allow for subclassing.

This is in preparation for further work to allow consecutive undoable events to be merged into a single event.
Added API for undo merging.

This allows the actions performed by an UndoContext to be merged with the actions performed by the previous UndoContext. This will be used by the UI to merge drag type actions into a single action for the purposes of undo. By default, no merging is performed - it is only performed if the new mergeGroup parameter to the ndoContext matches the parameter from the previous UndoContext. Merging is currently only implemented for ValuePlug::setValue() calls, but I don't see any use cases for the other undoable actions to be mergeable right now.

This commit also stops the ScriptNode::unsavedChanges() plug getting set when there is no current UndoContext.
Fixed multiple undo entries in virtual sliders cursor up/down nudging.

Fixes #400.
Added ScriptNode::undoAddedSignal().

Fixes #103.
Gave the GafferImage::Grade node's plugs default values instead of setting them explicitly in the constructor.
Fixing NumericWidget.valueChangedSignal() return type.

The previous signal type would stop calling slots when one returned True - that's not suitable for a notification that several slots might need.
Fixed multiple undo entries created by color chooser and ramp editor.

- Slider.positionChangedSignal() now passes a reason parameter describing why the positions changed.
- Slider.changesShouldBeMerged() method returns True if two consecutive changes should be made one in terms of undo.
- NumericSlider.valueChangedSignal() now passes a reason parameter describing why the values changed.
- ColorChooser.colorChangedSignal() now passes a reason parameter describing why the color changed.
- ColorPlugValueWidget and RampPlugValueWidget use the above to perform appropriate undo merging.
Updated NumericPlugValueWidget merging code.

The mechanism used by ColorPlugValueWidget and RampPlugValueWidget was much better, so adopting it for NumericPlugValueWidget makes good sense.

- Added NumericWidget.changesShouldBeMerged() method.
- NumericWidget.valueChangedSignal() now passes a reason parameter describing why the value changed (documenting a previously undocumented commit because it needs to be documented in the Changes file for release).
Added a newline for compilers which are partial to them.
Improved undo shortcut for focussed TextWidget based PlugValueWidgets.

Because the TextWidget has its own little undo queue of text edits, it also handles the undo and redo keyboard shortcuts. This was preventing the genuine graph undo/redo shortcuts from being triggered when a NumericPlugValueWidget, PathPlugValueWidget or StringPlugValueWidget had the focus. The shortcuts are now ignored unless there are text editing undo/redo events available, and the PlugValueWidget clear the text editing undos whenever they transfer changes into the plug value. This allows undo to work correctly for both intermediate (not transferred to the plug) text edits in the TextWidget, and for edits to the plug value.
Merge pull request #419 from johnhaddon/undoConcatenation

Undo Improvements
Added custom context variables to the ScriptNode.

Users can define any variables they want for the global context using the "variables" plug which is visible in the File->Settings... menu. The filename is also mapped to the script:name variable.
Fixed save and load of ReadOnly plugs.

The ReadOnly flag is now set separately on loading, after all the values and connections have been made. Also removed the TypedPlug and FormatPlug repr() implementations because they were duplicates of inherited functionality (and the TypedPlug one wasn't even bound with the right name).
Added support for variable references within variables in Context::substitute().
Added environment variable and ~ string substitutions.
Fixing bug in SplinePlug that caused freezes on CentOs 6
Fixed Ctrl+C copy shortcut in non-editable MultiLineTextWidgets.
Stopped FileMenu from reusing empty scripts when opening a new one.

The problem with the reuse code path was that the "unused" script may still have some modifications made to it by callbacks registered in startup files. This means that the incoming script is being loaded into a non-vanilla ScriptNode which might cause clashes. This change is required by an upcoming commit in which a startup file adds children to the variables plug of newly created scripts.
Removed Escape hotkey for leaving full screen mode.

The same function is served by the ` hotkey which actually toggles fullscreenity, and the Escape mechanism is unreliable because it was only available if it was the menu item that made the window full screen (there can be other causes).
Implemented automatic directory creation for Render displays.