fix #65 close window on escape

The ESC key was bound to the textarea . I rebound it to the entire
dialog. I also followed the suggestions on the internet to bind the
keyup event.

Fixes like this are very fragile to changes of annotator. I have seen
that other branches change the event system and I am not sure if this
merges well. I am a bit reluctant to change too much in the annotator
code.