Smarter SVG generation

Adjacent unicolor segments are now merged into a single path.
This generates approximately 50% less SVG elements.