test(matchers): make `toHaveClass()` matcher support SVG even when jQuery used

`toHaveClass()` is a useful matcher, but unfortunately leverages jQuery/jqLite's hasClass() method.
jQuery's class API does not support SVG nodes, while angular's does. Therefore, some extra work
needs to be done to make this work for both libraries.