QSvgText: Convert text to glyphs only once
The old code converted the characters of the QSvgText to glyphs from the
used QSvgFont once per drawing operation. Since fill and stroke are
drawn separately, this already meant converting the same text to glyphs
twice. If the same <text> element was referenced by a <use> element or
when calculating bounding rectangles, further repetitions took place.
Instead, the new code does the conversion when needed for the first time
and stores the result in the QSvgText object. As a side effect, also the
conversion from a QList of paragraphs to one QString happens only once
per object.
Fixes: QTBUG-139446
Pick-to: 6.11
Change-Id: I1a53ec0ac9e429a66434319030bca656f0c307c5
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>