AS the title says - when exporting closed curves (ellipses for example)
as polylines with the "Treat ellipses and splines as polylines" option,
the generated DXF file contained duplicate vertices. For example, an
ellipse polyline would have vertex1 and vertex40 which are identical in
terms of coordinates. This has caused exception upon importing.
Cause of that was that discretizer was blindly iterating through all
discretized points without checking if the first and last points are
coincident.
So, this patch adds a check for that to detect and skip the last
coincident point if it is in fact coincident during Export.