Improve snapshot creation and deletion performance on repositories with ...

...large number of snapshots

 Fixes #8958