ONOS-5309 Clearing installables from intent data object on successful uninstallation

Change-Id: Ic77af12f98bc1519efb2e2703223e340aa5b20e4
(cherry picked from commit 24389970b336c3bb2fb883f2aaa87f7b457bde4a)
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentInstaller.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentInstaller.java
index 332ca73..1e569c4 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentInstaller.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentInstaller.java
@@ -36,6 +36,7 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Optional;
@@ -112,7 +113,8 @@
                         uninstallData.setState(WITHDRAWN);
                         break;
                 }
-                store.write(uninstallData);
+                // Intent has been withdrawn; we can clear the installables
+                store.write(new IntentData(uninstallData, Collections.emptyList()));
             }
         };