Refactor empty() to work better on non-IE browsers.

1. Check node.innerHTML rather than node.canHaveChildren(), since the latter
only works on IE.
2. Limit empty(parent) to orphaning parent's children, rather than orphaning
parent's grandchildren.

Fixes https://bugs.dojotoolkit.org/ticket/17869.

IIRC there was a lot of debate about whether a scorched-earth `destroy()` method did more harm than good on IE, and by corollary debate about how `empty()` should work.   But `empty()` is somewhat a different ball of wax from `destroy()`: while `destroy()` is arguably supposed to work recursively, `empty(parent)` arguably shouldn't orphan the parent's grandchildren.