Sweave keeps track of what lines in the weaved output correspond to what lines
in the source. This is useful for programs like the patchDVI library, which
allow one to click on a spot in the compiled PDF file and be taken to the line
in the Rnw file which generated that portion of the PDF.
Previously, pgfSweave was mangling this info. This commit introduces a helper
function through which all code-chunk output should be passed. As a side
effect, it moves a lot of bolierplate into the helper function, cleaning up
the body of the pgfSweaveRunCode function.