fix polygon generalization artifacts, if last ring segment is one of two
segments exceeding the tolerance plus some cleanups