Window activation: support new focus reason: Qt::InputPanelFocusReason

The motivation for this patch is that we need a way (for
iOS/Android) to tell the currect window to remove focus from the
focus object when the user hides the input panel. Otherwise, if the
focus object is e.g a line edit, the cursor will continue to blink
inside it, which is wrong.

As it stood, telling the active window to deactivate
(QWindowSystemInterface::handleWindowActivated(0)), could cause
the whole application to deactivate, which is not what we want.

This patch will add a new Qt::FocusReason called
Qt::InputPanelFocusReason that can be specified when
telling the window to deactivate, so that we can avoid deactivating
the application just because the input panel got hidden. Note that
the implementation now allows the plugin to send deactivate for the
same window twize, in case the focus reason changed (especially
from Qt::InputPanelFocusReason to Qt::ActiveWindowFocusReason).

Change-Id: Ifd8bf7bb13ca0a61c6c300334f4bfc5f930c66b6