ISPN-3797 DataContainer should interact atomically with Persistence

* Changed DefaultDataContainer implementation to use named inner classes.
It avoids duplicate code.
ISPN-3936 State transfer should not modify or iterate shared cache stores

The entries were only removed from the data container, but the store was
still iterated on even when it was shared.