server: remove backslashes in tokens

latex commands start with a backslash (e.g. '\include{file}').
Passing latex commands is a security issue since a user can read files
from the server, therefore we forbid all commands.
server: support template folders

Templates often contain additional files (e.g. images). To support this,
copy the whole folder 'template' to the tmp_dir.
server: more elaborate error messages
server: change content-type to application/pdf

We know the output is a PDF file, therefore the Content-Type should be
'application/pdf' instead of 'application/octet-stream'
server: only print out output from pdflatex if error occurred
server: remove $response
server: remove unnecessary header information in file transfer
server: don't exit when file is sent
server: remove all files from tmpdir when done

We currently don't support subdirectories in template, because we simply
remove all files from the tmpdir. If there are subdirs, tmpdir isn't
empty and won't be deleted
server: don't print template

This was debugging code
server: remove commented code
server: remove template.tex from basedir