Remove qCopy usages from QList

QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html

Change-Id: Ib667321884b2f06de6f440f2b8e329361f926ce1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Allow Clang to compile without libc++

Clang is perfectly able to deal with the libstdc++ headers. The
problem on Mac is that those headers are mightily old (from GCC 4.2),
so they are insufficient for C++11 support.

So make a more accurate test. This allows Clang to enable C++11 in the
presence of newer libstdc++ header (e.g., Clang on Linux or Clang on
FreeBSD).

Change-Id: I4f457ca82bf13feca0af78c9363cb6365bb3f68e
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Normalise and deduplicate paths for XDG_DATA_DIRS

This removes the trailing slashes from the path and then removes dirs
set twice in XDG_DATA_DIRS (always removes those from the right side).

There's no use for duplicit dirs in XDG_DATA_DIRS because if whatever is
being looked up is not found in the duplicated dir the first time, it
won't be there the second time.

Currently it causes troubles for example in mime types, where it returns
duplicated mime types as the same dir is searched multiple times.

For obtaining the original value of XDG_DATA_DIRS, one can use
qgetenv("XDG_DATA_DIRS").

Change-Id: Ic4f8ef6c6fe096555948e318899207e9d4ca8289
Reviewed-by: David Faure KDE (deprecated, use kdab instead) <faure@kde.org>
Add detection for C++11 explicit conversion operators.

Change-Id: Ib33049b538f072079c0f840bc10adf0899217199
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>