SVG utils: add function to extract and replace styles of SVG elements
SVG utils: add function to add style CDATA section to SVG XML

This function can be used to add style sheets to an existing XML document. So
far it is only used by the dendogram.
3D viewer: simplify exported SVG by extracting styles

When a SVG document is exported from the 3D viewer, it now is optimized so that
all elements won't have style attributes anymore. Instead a class is added for
each unique style and this class is used instead on each corresponding element.

Fixes #820