Fix performance regression caused by SG signals in QQuickItem.

For a testcase with thosands of items, I measured an increase
in shutdown time from 800ms to 7500ms, all spent in disconnect().
This is not acceptible, so we're choosing a different approach.

If items implement a invalidateSceneGraph slot, this function
will be called during shutdown. It should be made a proper virtual
in Qt 6. This approach costs very little.

Change-Id: I5970143cc0a0744955687e17586f0bb00c9afb26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>

Conflicts:
	src/quick/items/qquickframebufferobject.cpp
	src/quick/items/qquickframebufferobject.h
	src/quick/items/qquickpainteditem.cpp
	src/quick/items/qquickpainteditem.h
	src/quick/items/qquickitem.cpp
	tests/auto/quick/qquickitem/tst_qquickitem.cpp
Merge pull request #48 from sletta/mer-stable

[qtdeclarative] Fix performance regression caused by SG signals in QQuickItem.