Fix matchClasses(), hasClass() and is() to work with non-space separators.

Classes can be separated by any white space, not just space characters.