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.
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.
Added automatic rib directory creation for RenderManRender node.
Added automatic ass directory creation for ArnoldRender node.
Defined standard project variables and used them to define default display, rib and ass locations.

This is all just defined in the default startup files for the gui app. Other applications are free to define totally different conventions or no conventions at all. Startup files with precedence in the searchpath can change the values for the project variables, remove them, or define variables of their own.

Fixes #407 and #59.
Added GraphComponent::clearChildren() method.

It seems worth having a specific method for this, rather than forcing everyone to roll their own, particularly because it can be much faster to delete from the end backwards, which might not be obvious.
Fixed ScriptNode::load() to clear existing variables.

This fixes a problem with File->RevertToSaved.
Greyed out File->RevertToSaved menu item when it doesn't make sense.
Documented an unresolveable problem with Serialisation::classPath().
Improved CompoundDataPlug data representation.

It now uses a new MemberPlug type to store the data, which provides some type checking and protection against rogue children being added. It also provides the future potential to replace the add*Member() methods with something tidier (see todo). To be honest though, this is mainly motivated by a desire to have a separate TypeId for the member plugs so that we can register a custom UI for them that'll still be picked up after they're promoted to a Box (UI code to follow).

This does break backwards compatibility with existing files containing CompoundDataPlugs with dynamic children. It should be a one-liner to provide compatibility at the expense of the removal of some type checking, but I'd rather break compatibility if people can cope fixing up existing files.
CompoundPlugValueWidget using PlugValueWidget.hasLabel() to avoid unecessary labelling.
Registered a custom UI for CompoundDataPlug::MemberPlug.

This means that promoted member plugs keep their original formatting in the UI.
Improved BoxUI by transferring custom UI registrations from internal plugs.
Merge pull request #408 from johnhaddon/scriptVariables

Added custom context variables to the ScriptNode.
Fixed bug where deleted children of Boxes weren't deselected.

In the course of doing this I introduced a new Behaviour class and an OrphanRemover behaviour, which removes nodes from a set when they lose their parent. We have several other candidates for behaviours (min/max plug constraints, input generator, etc) so we'll be fleshing out the Behaviours namespace over time.

Fixes #430.