Fixed compilation against thread-safe PHP (ZTS)

Closes #541
Patch-by: Benjamin Morel <benjamin.morel@gmail.com>
Signed-off-by: Sandro Santilli <strk@keybit.net>

git-svn-id: http://svn.osgeo.org/geos/trunk@4019 5242fede-7e19-0410-aef8-94bd7d2200fb
Add optimized RectangleIntersection functionality

Includes:
 C++ API, with tests
 C-API GEOSClipByRect, with tests

Initial C++ code provided by Mika Heiskanen.
Modified by me to work with arbitrarily ordered polygon ring vertices.

See #699 for background

git-svn-id: http://svn.osgeo.org/geos/trunk@4021 5242fede-7e19-0410-aef8-94bd7d2200fb
Remove debugging lines, reduce cost of envelope filter

... when the filter envelope fully convers the geometry envelope

git-svn-id: http://svn.osgeo.org/geos/trunk@4022 5242fede-7e19-0410-aef8-94bd7d2200fb
Fix bug in RectangleIntersection (was cought by testsuite too!)

git-svn-id: http://svn.osgeo.org/geos/trunk@4023 5242fede-7e19-0410-aef8-94bd7d2200fb
Fix bug in RectangleIntersection on finding rect fully contained

git-svn-id: http://svn.osgeo.org/geos/trunk@4024 5242fede-7e19-0410-aef8-94bd7d2200fb
Fix another boundary bug in RectangleIntersection

git-svn-id: http://svn.osgeo.org/geos/trunk@4025 5242fede-7e19-0410-aef8-94bd7d2200fb
Reduce max number of tests to 255, in case it makes clang happier

See https://travis-ci.org/libgeos/libgeos/jobs/36269669

git-svn-id: http://svn.osgeo.org/geos/trunk@4026 5242fede-7e19-0410-aef8-94bd7d2200fb