Keep the full preview rowid to fix navigation on 'z' mode.

When the collected images are changed (rejecting an image when the
filter is set to except rejected for example) it is important to
keep and update the rowid. The previous implementation was based on
the imgid to navigate to the next/previous image and the navigation
was not working when the image was actually rejected from the
collected images.

This fixes #9679.