Remove memory leaks from TWKB unit tester

git-svn-id: http://svn.osgeo.org/postgis/trunk@13020 b70326c6-7e19-0410-871a-916f4a2858ee
Fix memory leak in lw_dist2d_poly_curvepoly and lw_dist2d_circstring_poly

Also clear the memory management for lwcurvepoly_construct_from_lwpoly .
Fixes #2949.

git-svn-id: http://svn.osgeo.org/postgis/trunk@13021 b70326c6-7e19-0410-871a-916f4a2858ee
Fix leaks in lwcurvepoly_segmentize and its tester

git-svn-id: http://svn.osgeo.org/postgis/trunk@13023 b70326c6-7e19-0410-871a-916f4a2858ee