Bug 874913 download fx

This is based on PR #2196 but with invalidated tests deleted and on the mozilla fork for pushing to demo environment. Currently running on https://www-demo4.allizom.org
I would suggest adding a comment here to explain the logic, as this will probably be quite confusing to anyone without prior knowledge of the page?