QmlPreview: Parent rebuilt inner instances to their outer's new context
Rebuilding a component root replaces the contexts it is the context
object of: its outer context and the contexts of its composite base
levels. Instances of inner components created in one of those contexts
were then rebuilt with a new context parented to the old one. Ids of
the enclosing component resolved against the old context, whose
objects had been retired, and came back as null.
Record which contexts are replaced during a rebuild, and parent the new
contexts of later rebuilt instances to the replacements.
Pick-to: 6.12
Task-number: QTBUG-151189
Change-Id: Ic5f6d031a00cfc11aec8c2c1249f14160ff7382d
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>