Adds isNodeAttached helper method.

PR 1 for `onAttach`

This adds a helper method `isNodeAttached`. It lets you know if an element is a child of the document or not. I also updated `triggerDOMRefresh` to take advantage of the new helper.
Stubbing the method makes it a test that literally cannot fail under any condition, so there's no reason to do that. I updated the test to only verify that `document.documentElement` exists.