JS function for parsing SVG paths
Parse an svg path object and generate an Array of path commands. Each command is an Array of the form [command, arg1, arg2, ...]
NOTE: parsing is done via pathSegList
which is faster and more reliable than parsing the path string directly, but might not work in old browsers.