Cache output of GitFsResolver.refs and GitRemoteResolver.refs, fixes #1083