Optimize add and remove class cases

Test: attributes - Add Remove class (file: jquery.html)
  cheerio x 1,953 ops/sec ±1.70% (94 runs sampled)
  old x 718 ops/sec ±2.92% (88 runs sampled)
  jsdom x 55.61 ops/sec ±1.16% (74 runs sampled)