Fixed statesTracker and svgParser

Graphics states were not getting pop correctly. Minor fix in svgParser.
Add plugin.dowloader

Save generated PDF using just client-side.
Refactoring  document output mode.