Typed events.

Slightly WIP, the tyxml change is straithforward anyway. Solve https://github.com/ocsigen/tyxml/issues/36 and help https://github.com/ocsigen/js_of_ocaml/pull/150.

Should be orthogonal to @hhugo's current changes, and don't cause any merge hell.