createElement, appendChild should refer to "root" node's "ownerDocument"

Related to #555.

For better browser support when the HTML reporter is referring to a `root` node that is in another `document` object, `createElement` and `appendChild` operations should be done with respect to the `root` node's `ownerDocument`.

By better browser support I mean that at least Firefox was throwing exceptions (and not running tests) when the `root` node was in a different `document` context, i.e. the HTML reporter was running in an iframe.

All tests passing after changes were made and mocha.js was rebuilt with `make all`.