Making repository lock failure retryable

In a shared workspace environment, git checkout occasionally fails because another concurrent build has lock on the git repository(.git/index.lock).
(e.g http://jenkins-ci.361315.n4.nabble.com/Git-index-lock-problem-on-a-common-directory-td4488918.html)
This change resolves this problem by throwing IOException on lock failure to make operation retryable.