repo-add: add option for lock file.
This patch fix a problem with how repo-add/remove handle locking a repository. Currently, it will fail if the repository is locked and do so without a helpful exit code. This patch allow to retry locking until success or to exit with error code 2 on failure. This will allow synchronizing access to a repository.