[Shell Corona] Work around the popup dismissal bug on Wayland
A popup needs to grab the keyboard and the pointer in order to dismiss itself when another window is clicked. It works perfectly on X11.
On Wayland though, the compositor is responsible for dismissing popups if some surface of another application has been clicked. Note that I said "of another application." If user clicks some surface of the same application, the compositor won't dismiss the popup.
If the application uses only QtWidgets, then the popup will be closed as expected in both cases. But if the application uses both Qt Quick and Qt Widgets, e.g. plasmashell, then the popup won't be dismissed if a QQuickItem has been clicked.
It is a Qt bug, but for the time being, this change introduces an event filter that monitors Qt::MouseButtonPress events and when needed closes the active popup widget. This is a workaround.