XWIKI-11316: No way to access the document currently being exported from the pdf template
* Added a velocity variable in pdf.vm to store the current translated document ($tdoc), this way when $tdoc will be changed by the render function of the pdftemplate properties, this var will still point to the current document being exported.
(cherry picked from commit 728113153ea85de791921435d15d6cc11f0717d1)