Use the thread-safe GEOS API

Due to conflicts in error handlers between OGR and MapServer, we need to upgrade mapserver to use GEOS's thread-safe API (in order to use an application specific handle instead of globally setting GEOS's error handlers). c.f. #4733 . This will imply that 3.1.0 becomes the minimal supported GEOS version.
GDAL/OGR also made the same switch: http://lists.osgeo.org/pipermail/gdal-dev/2013-August/036877.html