Fix shared links

This fixes shared links and removes some old compatibility code for OC4. The diff for the apps/files_sharing/public.php may look as if lots of code was removed, but there was some additional strange copy/paste in it from a recent merge.

There are still some graphical issues. I don't have time to fix these at the moment.
- [ ] Folder breadcrumbs cover first file
- [ ] Password hint shows at top of page instead of in field
- [ ] Select all doesn't have any options
- [ ] Table headers are gray instead of white