Do not crash during global key presses.

This crashed because on Android we called

QWindowSystemInterface::handleKeyEvent() with QWindow argument set to 0

This is a regression and started to crash after commit d7ca800a8
(it added the call to tryHandleShortcutEvent() without checking the
window pointer).

Change-Id: Iefd5fe782a0f7f1e1569580ed4fcb2ef60eed2d2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>