Add support for definitions and gradients

Added a new internal class SVGTagWithParent, used to carry and propagate a reference to the main image