librbd: don't close an already closed parent image upon failure

If librbd is not able to open a child's parent image, it will
incorrectly close the parent image twice, resulting in a crash.

Fixes: #10030
Backport: firefly, giant
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Merge pull request #2881 from ceph/wip-10030

librbd: don't close an already closed parent image upon failure

Reviewed-by: Sage Weil <sage@redhat.com>