Popup Management

This requires brackets-shell branch randy/menu-open-event (pull request https://github.com/adobe/brackets-shell/pull/256).

This pull request is for: #1518, #2897, #3426 (when using menu)

More generically, this should cause any popup to get dismissed when any other popup is invoked, where the current list of popups are:
* menus
* context menus
* recent project list
* code hints
* (should this also handle quick open menu?)

A registerContextMenu method was added to PopUpManager because ContextMenus are created in AppInit.htmlReady callback, so they may or may not be created when PopUpManager is defining event handlers.

I'm not sure how to test in-browser menus -- probably needs to trigger beforeMenuPopup event.

This implements message APP_BEFORE_MENUPOPUP to get called from brackets-shell, which triggers beforeMenuPopup event. The Mac solution is kinda clunky because it sends message multiple times when menu pops up, and also when command is executed via shortcut key.