Retry committing locked files on error

When a config file is open for reading (without shared-delete permission), and then a different thread/process called git_filebuf_commit, that would fail, even if the file was only open for reading for a few milliseconds. This change lets git_filebuf_commit wait up to 50ms for the file to be closed by the reader.

Fixes #2207

In my environment, a service locks newly created files regularily. I set up a test case to continouously init new repositories, and with 4000 inits, I got 160 AccessDenied errors. Most of the times, it works on the `rename_try`, the maximum I saw were 3 errors in a row, so it succeded in the fourth try.

What do you think of this solution? It should not affect performance because the delay only occurs when the operation would fail anyway.