test: Fix tls tests which fail sporadically

The count of ECONNRESETs is dependent on timing, and thus unreliable, especially on Linux machines.

/cc @trevnorris @indutny