BUG-2470: fix ADD/DELETE state compression

If we are deleting a previously-modified node, we need check whether the
node existed before the transaction. It was there the modification needs
to be turned into a DELETE. But it this transaction introduced it, we
need to turn into a no-op -- otherwise we will trigger a wrong path.

If we don't the user will experience the effects of attempting to delete
a non-existing node, which is clearly not what the user intended.

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