Moved template to /common/tex
Added siunitx, mhchem, and related commands to template preamble
Use basename of tikz-file as pdf filename instead of the generic "template"
The reason was that pgfSweave's caching did not seem to
work properly with latexmk (I suspect latexmk did not
run the externalization commands, which pgfSweave does).