URL rewrite no longer needed for file downloads. Added PHP Proxy support

@markewallace @LorenzoBoccaccia  - The FileService used the serviceURL for constructing file download URLs. It now uses the endpoint's url rewrite function

Also added X-field into the header to support file uploads for the PHP proxy.

(accidentally deleted the unmerged branch for this change set)