add a optional retry mechanic to tcpconnect() so that if connect() fails with EADDRINUSE, we retry a set number of times and eventually fail