Replace the build system by something more convenient.

Use the same setup as js_of_ocaml and tyxml.
Fix the documentation generation.