make addVertex append before the closing point

`addVertex()` was pushing the new point onto the end of the outer polygon array, which makes it not a linear ring, which makes it not a polygon. that seemed bad to me, so i made it insert the new point just before the closing point.