Fixes cache poisoning on relationship traversal caused by cache invalidation order

Ensures that WriteTransaction invalidates the cache entries of deleted entities on Command execution
 and not on prepare.
Renames variable in NodeManager.invalidateNode
Unignores test that checks for the issue fixed and removes extraneous System.out and fixes the assertion
 condition to be correct.