If a popup window is opened, do not change the focus

It's not working to have QQuickWindow lose focus every time a menu is opened.
This doesn't happen on OSX because menus are implemented as special native
ones, but on X11 a menu is another window.  In QtQuick Controls it's
useful for copy/cut/paste Actions to be enabled based on whether
some text has focus.

Change-Id: I092b46133b9a8a44639ad9d89ee2bdfe30206bd9
Task-number: QTBUG-36292
Task-number: QTBUG-36332
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Implement the new inputmethod query API for Qt Quick

Part fixing Android input methods. This change corresponds
to 68a9229a97d358639 in the qtbase repository.

Task-number: QTBUG-37511
Change-Id: I483abf6a9d5dec86dbd1ae2dff2a85bc19d126f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>