onDomRefresh should only trigger if the view.el is actually in the DOM

So like 10 months later, I've finally got around to fixing this. :)

`onDomRefresh` never actually checked if the view.el was in the DOM, but just assumed it was based on events that had fired on the view (`show` and `render`).

This PR does an additional check in `onDomRefresh` against the DOM so we can guarantee it really is in the DOM.

FYI `document.documentElement` and `document.documentElement.contains(x)` should be [safe to use](http://www.quirksmode.org/dom/core/#miscellaneous).

I added a call to `view.remove()` so we didn't clog the page up with elements. Looks like there's lots of memory leaks in the tests... do we care about this? I always remove any views I created in my own tests.

Fixed #748 and fixes #479 and #505.