Fix removeClass tests to work with jsdom

In domino, $(selector).attr('attr') returns undefined if
an attribute is not defined. In jsdom, the same method call
returns null (which matches the browser more closely).

Fix the tests so they pass with jsdom.
Add test for serialize()