onKeyEvent 'Escape' key submitting form

Corrected problem in function onKeyEvent when pressing escape key
Memory leak: events not purged

Memory leak, events in components no longer in DOM are not being purged
Merge pull request #312 from manusa/master

[inmethod-grid] Memory leak + Escape key submitting changes in editable Grid