Two bugfixes to classList shim

Hey, I found two problems. 
1. Found a problem where if you try and add a class name to an element where that class already exists then you wind up with a scenario with multiple classes.
2. Since a className could have leading and trailing whitespace or multiple spaces between classes the class list is parsed incorrectly (ie for the case className= " foo    bar baz").

Should be fixed with this PR.