Fix EMPTY return from single-point lines and zero-length polygons

This commit ports new Centroid class from JTS (#612)

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