Generate <polygon> when painting polygon using QPainter
There is a distniction in SVG between a closed path with the Z
command and a path that is closed manually by using the lineto
command. When generating a polygon fram QPainter draw functions,
QSvgGenerator used <path> instead of <polygon>, but the generated
path never had the Z command leading to the polygon being open.
Instead, QSvgGenerator can generate a <polygon> tag to draw the
points.
Fixes: QTBUG-143451
Pick-to: 6.11
Change-Id: I1f79ba46e2e65b825d24f8a0986fdfc819dd42b6
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>