Gradient fix

Added rendering of gradientTransform, fixed gradient position ( not working since big commit of svg import ) fixed use of xlink:href in gradients, stop opacity 0% was omitted. Fixed toSVG for gradients.
Added gradients for stroke property.

Related to issue #1597
I prefer to just use `while` in cases when there's only one condition like `j--` — `while (j--) { ... }`