librbd: invalidate cache when set_snap() is called

This fixes a hang due to the snap_lock and parent_lock being
exclusively held during _set_snap().

The real bug obscured by the hang is that the cache may be
inconsistent if set_snap is called after I/O has
occurred. Fortunately, set_snap() is not used in this way
outside of tests as far as I know.

Fixes: #4525
Backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>