Qt5Compat: replace qSwap with std::swap/member-swap where possible


qSwap() is a monster that looks for ADL overloads of swap() and also
detects the noexcept of the wrapped swap() function, so it should only
be used when the argument type is unknown. In the vast majority of
cases, the type is known to be efficiently std::swap()able or to have
a member-swap. Call either of these.

For the common case of pointer types, circumvent the expensive trait
checks on std::swap() by using our hand-rolled qt_ptr_swap() template,
the advantage being that it can be unconditionally noexcept, removing
all type traits instantiations.

As a drive-by, remove superfluous inline keywords and template
ornaments.

Task-number: QTBUG-97601
Pick-to: 6.3 6.2
Change-Id: I7a73d45a282a9e13082178692fed8afec7bae823
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
commitb4f927dc94f02a2fa7edd5ecb3ef1ab8bffaedd0
parentaf9ada6ca89dca98551673ba33fc3b1eb309ba94
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeMon, 9 May 2022 11:13:11 +0200