Exactly test if a point is inside, outside or on the boundary of a polygon