[JENKINS-20258] prune branches during fetch
Make checkout lock failure retryable.