Android: preserve acceptance of synchronous key events
Cross-thread synchronous QWSI delivery flushes the window
system event queue and returns the last event's acceptance.
An unrelated event can overwrite the result for Back or Menu,
causing the default action even when the key was accepted.
Invoke synchronous key delivery on the GUI thread, where QWSI
returns the acceptance of that specific event. Keep the
Android caller blocked until delivery finishes and report
invocation failures.
Pick-to: 6.12 6.8
Change-Id: Iba36d4a5c744a0dbda7649644dd9804db6a081b6
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>