Leave at least 3 points in a polygon

It is possible in edit mode to remove all but two nodes in a polygon, leaving it essentially a line. This commit fixes that, ensuring a polygon has at least three nodes.