add better algorithm for polygon contains

QPainterPath::contains is unreliable, add improved
algorithm for polygons containing only lines