Sharing fixfiledownloadlink

Fixed download URL in public page
- Added OC JS functions to build sanitized URL query part
- Refactored download URL building to make it overridable
- Added download URL override in public page
- Added JS unit tests for download URL
- Added OC.redirect() method to facilitate unit testing

Fixes #4848 where the download URL is wrong in the public page when clicking on the "Download" link in a row directly

Please review @karlitschek @DeepDiver1975 @schiesbn