rbd-mirror: ensure that the last non-primary snapshot cannot be pruned
Tweak the normal pruning behavior to ensure that an incomplete initial
non-primary snapshot is not included in the prune set since we know
it will be complete since otherwise the image would have been deleted
due to not updating the mirror-image-state to enabled. Also ensure
we cannot prune a non-primary mirror snapshot if we don't have a
predecessor.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
ecd3778a6f9a6ca33aebbf47cef79db5f04157a9)