Fix spelling mistake

Doesn't matter when executing the code, but it hurts to mispell it when you
search for it.
Move aloha cleanup code to onClose method.
Move focus function to higher level.

The focusing has do be done after the template is attached to the DOM,
otherwise it fails to activate correctly. It also has to be done after
the content is loaded and after the editor is created. To that end,
we also implement a simple handler that resolves a promise once the
editor is created.