Fixes for GossipIntentStore
 * State checking to prevent state updates outrunning.
 * Copy IntentData on the way in and out of the store.

Change-Id: Id18164d15c896c5a62376aac17b7c8c2cac420c2
diff --git a/core/store/dist/src/main/java/org/onosproject/store/impl/EventuallyConsistentMapImpl.java b/core/store/dist/src/main/java/org/onosproject/store/impl/EventuallyConsistentMapImpl.java
index 0e6a590..66e85bd 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/impl/EventuallyConsistentMapImpl.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/impl/EventuallyConsistentMapImpl.java
@@ -242,11 +242,13 @@
         synchronized (this) {
             Timestamp removed = removedItems.get(key);
             if (removed != null && removed.compareTo(timestamp) > 0) {
+                log.debug("ecmap - removed was newer {}", value);
                 return false;
             }
 
             Timestamped<V> existing = items.get(key);
             if (existing != null && existing.isNewer(timestamp)) {
+                log.debug("ecmap - existing was newer {}", value);
                 return false;
             } else {
                 items.put(key, new Timestamped<>(value, timestamp));