Restore the current image when the preview activity is hidden

This PR remembers the currently displayed image while previewing, to be able to restore it on resume. It fixes #728.