Improving PopupMenu for touch screens

Here is an updated patch:

popup_menu_submenu_fix_and_improvements_on_ios.patch

submenus were still quite broken, when there was overlapping on iOS (when the submenu covers part of its parent menu, especially when submenus have submenus…). This patch fixes it by fixing the calls to window.reallyContains(..) in order to take into account the stacking order to toplevel windows.

Also this patch fixes the issue described here: Small inconsistency in mouse position in popupmenu (the fact that the item “under mouse” when the menu is displayed is automatically opened if it is a submenu item).

And it also makes it possible to close / re-open a submenu by clicking on its parent item (convenient when submenus take a lot of space).