Issue 542 - Add small/medium preview images for PDF files.

Refactored the image handling in the PP slightly.
There is now 1 central utility which generates all the preview images
given an input image.
Actually download the preview images in the unit tests for the preview processor.
Merge pull request #542 from simong/issue-542-add-medium-image-to-pdf-previes

Revision history previews problem