Add tests for class manipulation on jQuery object containing more than one element. Close gh-1404. (cherry-picked from 35b2b94979ed3419e50b72ab3b84307269fa25e8)