Fix incorrect exit status checking in sshutils

Method channel.is_closed() was called for checknig ssh command is
finished, but in some cases command was finished, but channel was
still open. Method exit_status_ready() should be called instead.

Also removed unnecessary call of fileno() and shutdown_write(), and
use select instead of poll.

Closes-Bug: #1263645

Change-Id: I9484fca758370b68553e98e9d4c409b493df1117
Merge "Fix incorrect exit status checking in sshutils"