Retry failed connect() and SSL_connect() calls, 5 times by default

[Fixes #77483672]