Improve tests/test-timeout.js

On my machine I sometimes get err.code 'ETIMEDOUT' and sometimes
'ESOCKETTIMEDOUT'.

Still skip this test on Travis though, because there have been other
issues with it.
Merge pull request #1212 from nylen/tests-improve-timeout

Improve tests/test-timeout.js