Clean up imports, allow <metal> to be commented

The original thinking behind the editor template in /Aloha-Editor/oerpub was
that the web browser will ignore tags it does not know and simply render the
content, as all browsers do in order to be backward compatible. What I lost
sight of was that this does not apply in the <head> of the document. The
<metal> macro tags in the <head> caused the browser to move these items
to the body instead. The simplest way to work around this is to escape the
<metal> tags in a safe way, and I've chosen to escape them as html comments.
That meant adding a bit of parsing in this product to restore them.