Fix bug in __libcpp_db::__iterator_copy.  Add debug test for swaping lists.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178892 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/list b/include/list
index 6040e7a..c6000c9 100644
--- a/include/list
+++ b/include/list
@@ -394,7 +394,7 @@
 #endif
     }
     _LIBCPP_INLINE_VISIBILITY
-    __list_const_iterator(__list_iterator<_Tp, _VoidPtr> __p) _NOEXCEPT
+    __list_const_iterator(const __list_iterator<_Tp, _VoidPtr>& __p) _NOEXCEPT
         : __ptr_(__p.__ptr_)
     {
 #if _LIBCPP_DEBUG_LEVEL >= 2