Clean up the declares.
Adding generate-thumbnail as simplified thumbnailer

This method simplifies the thumbnail generation for the case where we
are not storing the thumbnail on S3/CEPH. In that case, we download the
original, thumbnail it and hand it back to be sent to the client.