browse/revision: Refactor metadata handling and add typing
Final diff related to archived object metadata refactoring processing revision view.
While doing that, I noticed possible issues while trying to browse a content from a revision view so I also fix these. I can split the diff if needed (but tomorrow).
Related to #2330 (closed)
Depends on !308 (closed).
Migrated from D3096 (view on Phabricator)