Added trimming of id attributes.
Added removing duplicates of gradients with children elements.
Removing of duplicated defs is 3x times faster now.
Some speed tweaks and fixes.
8% faster, 0.5% better cleaning