qmlscene: ensure that the window & component get destructed

Task-number: QTBUG-32207
Change-Id: Ic7c45228cbdc049d3dfdb3482296d0e8c89a930c
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>