SSH2: Improve timeout handling

(thanks, SergeyTsalkov!)
Merge branch 'master' of https://github.com/phpseclib/phpseclib