Improve context passing for certificate gen.

* Improve mechanism for passing in scoring information to the
  PDF generation task.