BUG: Fix crash in vtkMRMLNode::UpdateNthNodeReference

This commit fixes regression introduced in previous commit r23435.
Interestingly the message in previous commit raised the question about
the assignment ReferencingNode. It turns out that the method
UpdateNthNodeReference was indirectly called after destroying the
referencing node.

The following pseudo stack trace illustrates the issue:

(obtained while running the test "vtkMRMLVolumeNodeTest1"

Destructor of vtkMRMLVolumeNode (referencing node)
-> SetImageDataConnection(0)
-> SetImageDataToDisplayNodes()
-> GetNthDisplayNode(n)
-> GetNthNodeReference()
-> UpdateNthNodeReference(referenceRole, n)
-> UpdateNthNodeReference(reference, n)
this->ReferencingNode = this

Since ReferencingNode is a weakpointer to the object represented by "this"
and was indirectly called in the destructor of "this", this was
causing a double free or corruption error. It was reported in valgrind
as a "invalid read of size 8".

The test is now passing. But valgrind is still reporting the error
like this one:

Generic Warning: In /home/jchris/Projects/Slicer-2-SuperBuild-Debug/VTKv6/Common/Core/vtkDebugLeaks.cxx, line 292
Deleting unknown object: vtkMRMLVolumeNodeTestHelper1

They will be fixed in follow-up commit.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23436 3bd1e089-480b-0410-8dfb-8563597acbee