ISPN-4291 Poor REPL state transfer performance with cache stores

https://issues.jboss.org/browse/ISPN-4400

* Skip the cache store iteration if the local node didn't lose any segments
* Move the invalidation after receiving the transaction data, so that write
  commands can be performed in parallel.
In general, we don't want `removeStaleData` to remove everything that it doesn't own if L1 is enabled and it has some L1 entries, we only want it to remove the entries that we know changed owners. We only remove everything that we don't own when we first become a member.