<rdar://problem/15593026>

Fix the algorithm used to detect a loop in a std::list
fix crash in SmallDenseMap copy constructor

Prevent a crash in the SmallDenseMap copy constructor whenever the other
map is not in small mode.

<rdar://problem/14292693>