Use element.matches where appropriate

Instead of element.localName in SOME_HASH, just use static CSS selector
strings and element.matches. Also did some minor cleanup of
empty-element pruning. Cannot use :empty selector due to limitations of
its behavior.
More calamine changes

Modified the returned doc frag slightly. cleaned up selectors, fixed a
bug when unwrapping an element chosen as a returnable element