Fixed ssh_scp_write so it works when doing recursive copy
Fixed ssh_scp_write so it works when doing recursive copy

There where two issues with ssh_scp_write:
1) It did not write a status message after the last write and OpenSSH
   would then give up after the write finished.
2) OpenSSH would sometimes write a status message, after near ends write.
   If scp_write didn't handle it, and subsequent status message. The remote
   window would shrink to zero and ssh_channel_write would start returning 0.

Signed-off-by: Einar Floystad Dorum <61ed93080ee6f9c62029c2810b0c7a859ce92b7f@mailthief.com>
Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

Distrotech/libssh,wangshawn/libssh,Distrotech/libssh,elastichosts/libssh,taikoo/libssh,wangshawn/libssh,sebadoom/libssh,kedazo/libssh,pouete/libssh,wangshawn/libssh,sebadoom/libssh,pouete/libssh,mwgoldsmith/ssh,bigcat26/libssh-mod,DouglasHeriot/libssh,mwgoldsmith/libssh,nviennot/libssh,bigcat26/libssh-mod,robxu9/libssh,nviennot/libssh,jt1/honeypot-libssh,rofl0r/libssh,wangshawn/libssh,nviennot/libssh,rofl0r/libssh,sebadoom/libssh,robxu9/libssh,mwgoldsmith/libssh,mwgoldsmith/libssh,sebadoom/libssh,kedazo/libssh,mwgoldsmith/ssh,elastichosts/libssh,mwgoldsmith/ssh,elastichosts/libssh,bigcat26/libssh-mod,DouglasHeriot/libssh,mwgoldsmith/ssh,kedazo/libssh,robxu9/libssh,jt1/honeypot-libssh,robxu9/libssh,rofl0r/libssh,pouete/libssh,taikoo/libssh,taikoo/libssh,kedazo/libssh,taikoo/libssh,jt1/honeypot-libssh,bigcat26/libssh-mod,DouglasHeriot/libssh,nviennot/libssh,jt1/honeypot-libssh,mwgoldsmith/libssh,DouglasHeriot/libssh,rofl0r/libssh,pouete/libssh,Distrotech/libssh,Distrotech/libssh