Implemented special treatment for transactions which detach their root node.

Per default, a tracked node that becomes detached is not changed; this means
that the last instance of this tracked node is used. However, if the node was
the root of the transaction which caused it to become detached, this behavior
is not desired. Rather, it can be assumed that the transaction cleared this
node or the sub tree it belongs to. Therefore, in this scenario the node is
replaced by a new empty node instance.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/configuration/branches/immutableNodes@1575770 13f79535-47bb-0310-9956-ffa450edef68