Verify SFTP retries when dealing with peer resets
Verify SFTP retries when dealing with peer resets

This verifies that Flysystem SFTP adapter goes through all the
configured tries before throwing an `UnableToConnectToSftpHost`
exception.

Reverting the fix applied in
https://github.com/thephpleague/flysystem/pull/1451 makes the test to
fail due to an unexpected `RuntimeException`.

Applying this for phpseclib v2 is a bit tricky, though, due to the lack
of knowledge on what has happened in the flow (e.g. `false` is returned
when a connection cannot be established or when an authentication error
happened). To make it work, the adapter for that version would need to
verify if there's a connection or not all the time - which doesn't sound
very good to me.

thephpleague/flysystem,thephpleague/flysystem