remotegcli-839862: Test fixes and tidy-ups

* Add environment to conversionContext - it is reasonable if we expose
  user supplied data at both execution time and conversion time.
* Fix minor doc error with labelling DOM nodes as HTML
* Sync with mozilla-central changes to helpers.js
* Use an alias for exports here because this module is used in Firefox
  mochitests where we don't have define/require
* Clean up types test properly to prevent leaks in Firefox

Signed-off-by: Joe Walker <jwalker@mozilla.com>