Make tagName matching case-insensitive in areElementsMergeable
Fix #178 (CSSClassApplier crashes when used with custom NS elements)

The CSS class & className attributes are only available on HTML elements.
Cope with these variables being undefined.

In addition, only remove or merge elements that are in the HTML namespace.
Merge branch 'xhtml-safe' of https://github.com/peitschie/rangy into peitschie-xhtml-safe
Tweaks to HTML namespace checks in class applier
Merge branch 'peitschie-xhtml-safe'