Miscellaneous code improvements for svg.js
Merge pull request #5179 from timvandermeij/misc-svg-fixes

Miscellaneous code improvements for svg.js
Minor changes for api.js, font_loader.js and svg.js