Helpers for working with Dominator

Very loose at the moment, and some macros assume the existence of other crates (serde-wasm-bindgen, cfg_if, etc.)