Fix tst_qqmlecmascript::signalEmitted
Fix tst_qqmlecmascript::signalEmitted

This test executes code in the Component.onDestruction signal handler that ends
up doing things like allocating new V4 objects on the GC heap. Since Component.onDestruction
is called (indirectly) from QV4::QObjectWrapper::~QObjectWrapper(), we have a slight
problem:

From within the destructor of a garbage collected object, _during_ a sweep, we
end up trying to allocate new managed objects. Instead of adding more
complexity to the memory manager, this patch avoids doing clever things in the
destructor, by delaying the emission of the destructed signal to the point
right before the real deletion of the QObject (which was already delayed with a
deleteLater).

Change-Id: I15d5ad36feee930745e1a3a0efb5be9a302426d3
Reviewed-by: Lars Knoll <a812617a4072dcbeb80684eca0f369f0083af109@digia.com>

matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,qmlc/qtdeclarative,qmlc/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,qmlc/qtdeclarative,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,matthewvogt/qtdeclarative,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,matthewvogt/qtdeclarative,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,mgrunditz/qtdeclarative-2d,qmlc/qtdeclarative,qmlc/qtdeclarative,matthewvogt/qtdeclarative