Speed up QSvgStructureNode::releaseDescendants()
The previous implementation traversed the tree of objects until it found
something it may delete. Then it deleted that and started from the root
of the tree again to find the next object.
Instead, this code traverses the tree only once and deletes what it
finds on the way.
Amends 22d503993d156d89086f1a68c76670cbc7130be0
Task-number: QTBUG-145916
Pick-to: 6.11 6.10 6.8
Change-Id: If693f62ea469d85536eed0fcf7a87103c335c68c
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>