#5001: Fixes jqLite not correctly adding & removing classes in IE9

This PR is a cleaned up version of [#5686](https://github.com/angular/angular.js/pull/5686).  This is for #5001.

Somehow my history got polluted due to bouncing between two different computers.