Enable celery.delay for PDF generation

* Also bug fixes for data correctness when running over an entire class
  with possibly-corrupted Aggregation table.