TreeModel: Ensure deterministic state during child destruction
TreeModel: Ensure deterministic state during child destruction

This allows tree items to rely on not being part of a model
inside their destuctors.

Change-Id: I5f19739d3701426b068a07bf82f5199fbb259f29
Reviewed-by: Eike Ziller <c142da16c73a95a82d35191bcc55b22835617128@theqtcompany.com>

xianian/qt-creator,xianian/qt-creator,xianian/qt-creator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,xianian/qt-creator,martyone/sailfish-qtcreator,martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator,xianian/qt-creator,martyone/sailfish-qtcreator