See bug report for more details. Fixes https://gitlab.com/kicad/code/kicad/issues/9150
This also allows for easier migration to DRAWSEGMENT::S_RECTs by auto-converting 4 rectilinear lines to a rectangle.