Display errors in Firefox and moves errordiv to head

Fixes the following issues:
* Firefox was not displaying errors (because it doesn't support innerText)
* Once displayed, error text in Firefox would contain only the stack trace, not the actual error message (because Firefox's Error.stack does not contain the message itself)
* Long error text (e.g. with stack traces) would be drawn over the parameters window. Fixed by moving errordiv into new  id=head div (which also contains former id=head logo img)