Fixes #1900: Any base network can now be removed from the root-network if the root-network has another subnetwork to replace it. The Session XGMML Writer now tries to prevent a disposed network from being serialized.

Change-Id: I71f4f27fa4c0714c3822c3ed5f791f342ad36329