QPA: Add interface for setting the application state explicitly

The motivation for this patch is twofold:

1: we need a way (for iOS/Android) to tell the current 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 stands, telling
the active window to deactivate
(by calling QWindowSystemInterface::handleWindowActivated(0)), will cause
the whole application to deactivate if no windows are active, which
is not what we want.

2: Qt currently understands just two application states, Activated and
Deactivated. On mobile platforms we can have other states
as well, like "suspended" on iOS. So controlling the application
state should not depend on window activation, but instead be controlled
through a separate API by the platform plugin.

This patch will add the following function:
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState newState)
that lets us control the application state from the plugin. This also
means that we factor out application state handling from window
activation, which also gives us a way to remove focus from a window while
keeping the application active.

Investigating which states (other that active/inactive) it makes sense
to add to Qt::ApplicationState will be a topic for later patches.

Change-Id: Ic6fdd3b66867abb67da43eba04ec86f06d82ff94