Removed unused (and unimplemented) Gadget constructor.
Adopted new Python wrapping mechanism from Cortex.

This allows us to avoid a great deal of overhead when wrapped classes are created from Python but not subclassed.
Fixed test cases for wrapping changes.

Prior to this, a lot of unnecessary wrapping and garbage collection for wrapped-but-not-subclassed objects meant that we could use "is", but now we must use ".isSame()" to work around object identity problems. That's the price we pay for improved performance in this case. Note that in general ".isSame()" has always been necessary for RefCounted types, and we were just lucky that the particular types used in those tests had been wrapped before.
Fixed test by removing member injection from non-wrapped class.

With the new optimisations in the wrappers, we can only expect object identity to be preserved for wrapped classes subclassed in Python.
Removed bad RefCounted.isSame( bool ) from NameLabel.

For some reason we were getting away with this when the isSame() binding accepted RefCountedPtr, now that it takes RefCounted * our blatant mistake is being pointed out to us.
Fixed crash in GraphGadget destruction.

This one is quite interesting. The GraphGadget stores its root node with a smart pointer in m_root. If noone else has a reference to the root, then the root node is deleted during the destruction of the GraphGadget. Prior to our wrapper changes this wouldn't occur immediately because the ScriptNode would require garbage collection by IECore::WrapperGarbageCollector - this essentially delayed actual destruction of the root until well after the GraphGadget was destructed fully.

Now the root is deleted immediately. While it is doing this, it removes all its children, which in turn remove all their connections, which in turn signal to the GraphGadget that something has changed. But the GraphGadget is destructing, so it blows up trying to deal with the signal. But surely all the signals should be disconnected from the GraphGadget automatically on destruction, because it derives from boost::signals::trackable? Well sure, but that will only happen when the trackable base class destructor is called, which is /after/ GraphGadget has destructed - so too late. The solution is to use scoped_connections to store the connection. These are stored in m_nodeGadgets, which is guaranteed to be destructed before m_root (members destruct in reverse order of initialisation). This ensures GraphGadget is disconnected from all signals before m_root dies, and GraphGadget can die in peace.
Added workaround for crash in InteractiveRenderManRenderTest.

The comments describe the situation whereby the InteractiveRenderManRender node was evaluating the scene while the connections were in an invalid intermediate state. This was actually occurring during the destructor for the ScriptNode containing the renderer, which removes all children (and therefore their connections). That destructor is now triggered much earlier because it no longer requires garbage collection, unmasking a problem which has existed all along.

The comment also describes a proper fix for the problem which we should implement when time allows.
Merge pull request #780 from johnhaddon/wrappers

Optimised Wrappers