tcp: rewrite connection timeout using tvhpoll wrapper