[relate] handle simple polygons in relate(L,A), remove some redundant code from L/L and L/A, add tests