Fix ImageProvider and FileProvider bugs on generating private url for reference (breaks xsendfile download)

For ImageProvider, generatePrivateUrl, format "reference" was trying to fetch nonexistent reference thumbnail instead of the actual reference image.
For FileProvider, generatePrivateUrl always returned false, which is incorrect, since the "reference" file actually exists.
This issues breaks X-Sendfile downloads for both media types.