Fix pthread detection for Android; and consequently make sure that cpl_virtualmem.cpp compiles by detecting if we have the GNU mremap() with 5 arguments (which Android doesn't have)

git-svn-id: https://svn.osgeo.org/gdal/trunk@27315 f0d54148-0727-0410-94bb-9a71ac55c965
Merge branch 'trunk' into trunk_travis_macosx