refdb: add retry logic to the threaded tests
refdb: add retry logic to the threaded tests

The logic simply consists of retrying for as long as the library says
the data is locked, but it eventually gets through.

stewid/libgit2,stewid/libgit2,stewid/libgit2,stewid/libgit2,stewid/libgit2,stewid/libgit2