Fix existing element removal

Fixes element removal from both existing nodes and root nodes. The former is a bug in the implementation. For the later case there is a fair amount of memory overhead introduced due to root objects not being possible to reclaim.
Perform manual string parsing for hasClass

This is faster and avoids additional memory pressure from temporary array objects.

Test: attributes - Has class (file: jquery.html)	cheerio x 46,072 ops/sec ±15.20% (61 runs sampled)	old x 4,477 ops/sec ±19.32% (46 runs sampled)
	jsdom x 3,123 ops/sec ±2.84% (89 runs sampled)
	Fastest: cheerio
Merge branch 'hasclass-opt'
Merge branch 'removal-fixes'

Conflicts:
	test/api.manipulation.js