While working on fix, improved several code issues

See here for fix playground: http://jsfiddle.net/JVBEw/10/
Merge branch 'fix-gradient-text-rendering' into fix-zooming-when-rect-is-set
improve rendering loop