supports non-manifold polygons, improved cycle finding routine
added test case for contracting cycle