QQmlTreeRow: Don't export the tree recursively
QQmlTreeRow::toVariant(), used by TreeModel's rows property and
getRow(), called toVariant() on each child, recursing once per level of
the tree. A tree nested deeply enough therefore exhausted the native
stack when its rows were read back.
Export the tree iteratively instead, in post-order, keeping the rows
still to be completed on an explicit stack.
Pick-to: 6.12
Task-number: QTBUG-151007
Change-Id: Ibb4e5f4c1baa0c0f5d9aa3b2aece2aa32f7a108f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>