vc-refactoring: Refactored the revision navigation
* don't cache all existing revisions in the case of a scoped repository
* next_rev and prev_rev use the history, even in the case of a non-scoped
repository, as this does authorization checks
* oldest_rev should be 1, not 0