browse/snapshot_context: Fix release retrieval for large snapshot
A release is looked up by its name and not its branch name in a snapshot.
For git origins, the branch name differs from the release name:
"/refs/tags/(release_name)".
So lookup for that type of branch name first and add fallback for release
name for other origin types.
Closes T2437