Store filename and pdf bytes in pdf document

This allows tests to save the pdf in failure cases for later inspection.

We grab the filename presented by the content-disposition http header, and
fall back to guessing the filename from the url query string if it's not set.