fix SVG2PDF

there were some logical issues, with SVG2PDF assuming it was run
both before and after figure extraction.

Also makes the inkscape command configurable,
in case it doesn't work some places.

Adds pdf block for output in latex templates.

closes #3693