Refactor screenshots and hide those unavailable when offline

The details page displays a number of screenshots for regular apps and
it works offline as long as the screenshots have been previously cached.
However, if the screenshots have not been cached, an error screenshot
placeholder is shown instead. This is a problem for many users who are
constantly offline, as most of their apps will display the error
screenshot and thus affect the UX negatively as every app appears to
have an issue.

To help provide a cleaner UX, this patch hides screenshots if they
cannot be loaded when the user is offline. In the process these changes
also refactor the logic around showing the screenshots.

This doesn’t change the behaviour if the user is online.
2 jobs for offline-screenshots in 19 minutes and 8 seconds (queued for 1 second)
Status Job ID Name Coverage
failed #320839


failed #320780


Name Stage Failure
build-gnome-software Build

Ok: 0
Expected Fail: 0
Fail: 1
Unexpected Pass: 0
Skipped: 0
Timeout: 0

ERROR: Job failed: exit code 1