OGR: for GEOS support, require GEOS >= 3.1.0 and use the _r API of GEOS to avoid issues with the global GEOS error handlers (see https://github.com/mapserver/mapserver/issues/4733) and also save a mutex call in exportToGEOS()

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