'heap-use-after-free' error when uninitializing isolator

I found an error path in the test simulator where the Flyweight objects
are deleted before the uninitialize function is called. The default
Flyweight destructor seemed to delete all the shared pointers in
iv_index, but not actually clear out iv_index. So when the uninitialize
function called Flyweight.clear(), it tried to delete data that was
already removed from the heap. The solution was to call clear() from the
Flyweight destructor to ensure everything is deleted properly.

Change-Id: I485ce08570af7e59d9ec43cb054bce77b6866348
Signed-off-by: Zane Shelley <zshelle@us.ibm.com>
diff --git a/src/util/hei_flyweight.hpp b/src/util/hei_flyweight.hpp
index 6228759..a81fe30 100644
--- a/src/util/hei_flyweight.hpp
+++ b/src/util/hei_flyweight.hpp
@@ -18,7 +18,10 @@
     Flyweight() = default;
 
     /** @brief Destructor. */
-    ~Flyweight() = default;
+    ~Flyweight()
+    {
+        clear();
+    }
 
     /** @brief Default copy constructor. */
     Flyweight(const Flyweight&) = delete;