chore: reorganize WithResolvedRev render
Created by: ijsnow
Reorganize WithResolvedRev render function to check for cloning first. When a repo is cloning, the server responds with 404 so this may be the cause of https://github.com/sourcegraph/sourcegraph/issues/656 but I haven't come up with a repro that actually causes the bug even though I've seen it in the wild.