Fix weblient crash and handle broken image links in public shares correctly (rebased onto dev_5_0)


This is the same as gh-3153 but rebased onto dev_5_0.

----

This fixes the webclient crash introduced in #3124 when viewing shares with broken image links. Previously to this they were rendered as a special broken link, now it doesn't get to that point because of a webclient crash.

Testing Instructions
--------------------------
- Create a share with some images
- Delete one of those images
- Try and load the share, a broken link icon should be displayed instead of a webclient crash.