Lib: add unload event.
Merge pull request #189 from dbuenzli/unload

Lib: add unload event.
Simplify signatures, following tyxml changes.

Export correctly wrap equalities.
Do not erase Html5.Xml and Svg.Xml (they are needed by the syntax extension).
Use explicitly tot and toelt for coercions with Xml.elt.