Added clear() method to state objects to disassociate other objects

Change-Id: I2e46c1c55177b9261a243dea0585d051c402a8b6
diff --git a/dev/js/src/state.js b/dev/js/src/state.js
index d561a8b..78cd4cc 100644
--- a/dev/js/src/state.js
+++ b/dev/js/src/state.js
@@ -73,6 +73,13 @@
      */
     associates : function () {
       return this._assoc.length;
+    },
+
+    /**
+     * Clear all associated objects
+     */
+    clear : function () {
+      return this._assoc = [];
     }
   }
 });