Use updateClassName instead of addClassName and removeClassName

*Needs review.* This introduces a new method of simultaneously adding and removing class names on an element. Previously this was done using the `addClassName` and `removeClassName` methods, but combining these results in multiple updates to an element's `className` property, thus introducing the possibility of a relayout/reflow in between calls. The `updateClassName` method can add and remove multiple class names and only changes the element's class name once. The `addClassName` and `removeClassName` methods are now deprecated.