[#1000] Enable CORS support if supported for pdf and text previews
CORS allows servers to set domains which can load data from them. If servers allow us to fetch files, we don't need to use the resourceproxy. This lowers the load on CKAN and enables faster previews.