Improved curve performance

We change from rebuilding the curve every time anything on it changes to
instead marking it dirty and only rebuilding it in the paint method if
it is marked as dirty.

The dirtying operation is very quick and the build operation only has to
be done once per draw rather than every time anything changes along the
curve. This makes it significantly more performant.

We rename curveUpdate to dirtyCurve to reflect the change of purpose.
Minor tweaks to curvemethod for Nodes
on# Changes to be committed:
Merge branch 'curve-performance' of https://github.com/michaeljones/RigControls
Functionality for Node Merging into another Wiregroup working

Now a node can be merged across into another Wiregroup by clicking on the
node and pressing CTRL and dragging the node over the node you want to
merge to. The node you want to merge to will glow white when you are over
it. Releasing the mouse will merge it.

Note that it is the targetNode that you are moving to that stays in the
scene, the node you are moving is destroyed in the merge. The targetNode
then takes its place in the node/pin/pinTie arrays of both WireGroups.

Once the node takes its place in the arrays of the WireGroup the current
Wiregroup RigCurve is destroyed, and the references to it are stripped
from the Nodes. A Completely new Curve is the built from scratch for the
wiregroup using the new arrays.
Storage is now working for reference Nodes/Pins for Node Merges

Storage now works for Nodes and Control Pins. An extra attribute is
included in the storage, which indicates if the Node/Pin is native or
referenced from another WireGroup. If native, the node/pin is constructed
on "read"  as normal. If referenced then a NodePinReference() object is
created which stores the wiregroup name and index required to find the
node/pin and drop it in later.

In turn this means that the WireGroup curves cannot be generated until
until the references are resolved, with the referenced node being dropped
in the slef.nodes and self.pins lists. Once this is implemented then the
curves can be drawn.
Store and Load of Node Merging is now supported

Now nodes/pins can be merged into other wiregroups. The results can be
stored and reloaded in through the XML face files. Currently multiple
levels of merging are allowed, so a node can merge into more than one
WireGroup. On the most part this is stable, but there does seem to a
couple of very complex cases where the read, after storing fails.
Investigate this. I think it will be bullet proof is you do try and merge
a node that is already merged.

The storage is done by checking whether a node/pin is native to the
current WireGroup being stored. If it is native (as in created within the
Wiregroup initially) then it is stored with an attribute (state) as
native. If it is not native (has been merged in from another Wiregroup)
then is stored as state = reference.

This is picked up by the read method on the Wiregroup at loading. If it
finds a native node/pin then it rebuilds it normally. If it finds a
reference, then is creates a instance of a NodePinReference and stores it
in place of a node or pin in the WireGroup lists.

Once all Wiregroups are built, then these references are processed and
correct nodes/pins from neighbouring Wiregroups are substituted in. Once
this process is resolved, then the final Wiregroup curves are built.

There are lots of doc strings in the methods to help describe this process