This allows to avoid repeating the same pattern of retrieving the last snapshot
for a given origin.
Note that this also makes the new function return a Snapshot model object as
well.
Impacts only swh-web which I'll deal with [1]
(.../swh-environment) $ grep snapshot_get_latest */swh/**/*.py | grep -v "\btest" | grep -v "swh-storage/swh" swh-web/swh/web/common/service.py: snapshot = storage.snapshot_get_latest(origin, allowed_statuses) `
[1] D3315
Related to T2310
Those are currently mutable visits and indeed, it's not explicited.
We create the first at the loading time.
And we mutate its state when the loading is done to associate its visit status and snapshot.