optionally serve image via cloudfront distribution

This builds a url using a cloudfront distribution if the setting is present in configuration. If the setting is missing it serves directly from S3 as previous.