dumb: Retry HTTP request checking protocol in case of temporary failure
Some network issues can also happen when checking a git repository can be cloned using the dump protocol so add HTTP retry feature to the check_protocol function.
Fixes SWH-LOADER-GIT-1NT
I also fixed some mypy reported errors in another commit.