Revise DOM API

I tried to clean up the DOM API, by mostly following  https://dom.spec.whatwg.org/. This version does **not** include 

- Browser specific properties (except some for `Event`)
- Properties / interface from older versions of the spec ( < DOM Level 4) which have been changed / removed

Ideally we could somehow create separate declarations for this and put everything together. If people can choose which standard lib declarations to use, would it make sense to create something like `dom.js` (latest) and `dom3.js`? Thoughts?

Next step would be to go through https://html.spec.whatwg.org and do the same for HTML.

---

What I originally wanted to do was to programmatically convert IDL interface declarations to flow class declarations, but I haven't found a parser yet that can understand the latest version of WebIDL. But I think this would still be worth pursuing at some point.