Now Bitcode reader bug is fixed. Reapply 80839.

Use CallbackVH, instead of WeakVH, to hold MDNode elements.
Use FoldingSetNode to unique MDNodes in a context.
Use CallbackVH hooks to update context's MDNodeSet appropriately.

llvm-svn: 80868
diff --git a/llvm/unittests/VMCore/MetadataTest.cpp b/llvm/unittests/VMCore/MetadataTest.cpp
index f174fb6..cdf5a6e 100644
--- a/llvm/unittests/VMCore/MetadataTest.cpp
+++ b/llvm/unittests/VMCore/MetadataTest.cpp
@@ -85,7 +85,7 @@
   MDNode *n2 = MDNode::get(Context, &c1, 1);
   MDNode *n3 = MDNode::get(Context, &V[0], 3);
   EXPECT_NE(n1, n2);
-  // FIXME: Enable uniqueness test.  EXPECT_EQ(n1, n3);
+  EXPECT_EQ(n1, n3);
 
   EXPECT_EQ(3u, n1->getNumElements());
   EXPECT_EQ(s1, n1->getElement(0));