make the associative containers do the right thing for propogate_on_container_assignment. Fixes bug #29001. Tests are only for <map> right now - more complete tests will come when we revamp our allocator testing structure.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@279008 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__tree b/include/__tree
index bfcec78..b560bf0 100644
--- a/include/__tree
+++ b/include/__tree
@@ -1419,7 +1419,11 @@
 
     _LIBCPP_INLINE_VISIBILITY
     void __copy_assign_alloc(const __tree& __t, true_type)
-        {__node_alloc() = __t.__node_alloc();}
+        {
+        if (__node_alloc() != __t.__node_alloc())
+        	clear();
+        __node_alloc() = __t.__node_alloc();
+        }
     _LIBCPP_INLINE_VISIBILITY
     void __copy_assign_alloc(const __tree& __t, false_type) {}