dom: Basic plumbing for local DOM testcases

And a test from a bug report:

    https://github.com/andreww/fox/issues/23
dom: More tests for the phrase setting bug

I cannot see other cases where this may be an issue.