add a custom event loop for popups that closes the menu on mouse button release events and - most importantly - propagates this event back to any parent menu. fixes #633