QNX: Fix QDir::entryInfoList()

If D_FLAG_FILTER is set, duplicate name entries are filtered out, so
this flag has to be set along with D_FLAG_STAT in the call to dircntl.

Also releaved dependencies between defines__EXT_QNX__READDIR_R,
__EXT_QNX__READDIR64_R and _POSIX_THREAD_SAFE_FUNCTIONS

Back-ported from qtbase: aee59f06e0017e225363d4207d3d96c2b30698e1

Change-Id: Ifa2148cc49544076fcfe8fb88e2a0dfe2404959e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Fix building of JSC with libc++.

Follow-up to 0de22e8 and 427d50d: the former was not just a cleanup
commit, and part of the changes reverted in the latter actually broke
the build with libc++ again: clang defines __GNUC__ for compatibility
with GCC, but if libc++ is used ext/atomicity.h does not exist.

Change-Id: Id86646d38b7bc62dbe0731f8f32efb2353335210
Reviewed-by: Andy Shaw <andy.shaw@digia.com>