Bugfix: List snapshots in backend at most once to resolve snapshot ids

Many commands support specifying a list of snapshot ids which are then used to
determine the snapshot accessed by the command. To resolve snapshot ids or
"latest" and check that these exist, restic listed all snapshots stored in the
repository. Depending on the backend this can be a slow and/or expensive
operation.

Restic now lists the snapshots only once and remembers the result to resolve
all further snapshot ids.

https://github.com/restic/restic/issues/3428
https://github.com/restic/restic/pull/3570
https://github.com/restic/restic/pull/3395
