2D: Add auto test for stale barset crash
In the componentComplete, the list of children is
iterated. If a child is a barset, it's added to the series.
If a QBarModelMapper calls deleteLater for undetached barset before
the componentComplete is called for a barseries, it tries to qobject_cast
a deleted object. The patch sets a barset's parent to nullptr before the
call to deleteLater.
Pick-to: 6.12
Change-Id: I58e78eb446541a3c31fc8753ce98acf5c341cd78
Reviewed-by: Tomi Korpipaa <tomi.korpipaa@qt.io>