Don't crash when a signal/slot connection outlives the engine

In the test case in the bug, the signal was emitted from the QApplication
destructor (somewhere from the qpa plugin when the platform windows were
destroyed)

Task-number: QTBUG-37351
Change-Id: Ieec59e12be10bab1428743b80eecdf22ef9d8bf6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>