host-deploy: SSHDialog: close streams after sink is stopped

this solves Pipe Closed exception happens because of try-with-resources
that was introduced at main thread, this closed the input stream before
the reader thread could terminate properly.

this also reverts 4d544a99, as it happens from same root cause, and I
read the java sources incorrectly, the buffered input stream uses
byte-by-byte read and not buffered.

add unit test to reproduce this issue.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1084911
Change-Id: I180a9883eefac57c9b528ff7b6df0eda11149255
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>