Prefer swap() member function to std::swap. We were hitting the
inefficient generic std::swap for some derived types.