nix-prefetch-git: fix printing of revision

If the user explictly gives a ref such as "refs/heads/master", `git
rev-parse` failed because we only checked out the `fetchgit`
branch. Now, we also try `git rev-parse fetchgit` if the first call
fails, which fixes the issue.
nix-prefetch-{bzr,hg,svn}: print fetched revision
Merge pull request #2899 from bennofs/nix-prefetch-revision

nix-prefetch-*: print fetched revision