PTFM-9856 File download optimizations for dxfs

@kjlai or @kislyuk, would you care to review? The last commit introduces some new infrastructure, so, if you think it would be helpful, I'd be happy to meet with you to discuss its design/purpose and walk through the code.