popupMenu: Promptly close the menu if grab fails
Popup menus require grab in order to work properly. At the moment a popup menu tries to acquire the grab after it has been opened. If the grab cannot be acquired we should immediately close the menu.
Fixes: #704 (closed)