[Fixes #1548] Watch for escape button being pressed

Fixes Issue #1548 

First we define the jQuery object as $ using requirejs (line 6), we then use jQuery to bind the keyup event to the body (line 61). When the event occurs we use the escapeEvent function (lines 76–82) to verify that it was the escape key (keycode 27) that was pressed. If it was, we then use $scope.close() to close the opened "panel" and then unbind the event from the body to ensure we aren't using up memory / cpu for no reason.
`.bind` and `.unbind` have been deprecated as of jQuery 1.7 in favor of `.on` and `.off`. Also, `element` here is a jQuery-ified version of the config DOM node, so you should be able to use `element.on`