Move InMemoryDataTreeModification.mergeImpl()

The merge implementation should really live on
OperationWithModification, so this operation routing is consistent. This
has the side effect of speeding up verification on merges.

Change-Id: I2c07fa65b5846f618a476cc6f7f9d0c862b85811
Signed-off-by: Robert Varga <rovarga@cisco.com>
Prune empty nodes from transaction when it is sealed

When we seal() a ModifiedNode tree, check also whether we have unmodified
children and prune them. Also turn a SUBTREE_MODIFIED with empty nodes
into an UNMODIFIED node.

Change-Id: I077d23023fdbfb4ab232ed826cc32b4541779e87
Signed-off-by: Robert Varga <rovarga@cisco.com>