borg serve: fix transmission data loss of pipe writes, fixes #1268
borg serve: fix transmission data loss of pipe writes, fixes #1268

This problem was found on cygwin/windows due to its small pipe buffer size of 64kiB.

Due to that, bigger (like >64kiB) writes are always only partially done and os.write() returns
the amount of data that was actually sent. the code previously did not use that return value
and assumed that always all is sent, which led to a loss of the remainder of transmission data
and usually some "unexpected RPC data format" error on the client side.

Neither Linux nor *BSD ever do partial writes on blocking pipes, unless interrupted by a
signal, in which case serve() would terminate.

edgimar/borg,raxenak/borg,RonnyPfannschmidt/borg,RonnyPfannschmidt/borg,edgewood/borg,edgewood/borg,raxenak/borg,RonnyPfannschmidt/borg,edgimar/borg,edgewood/borg,raxenak/borg,RonnyPfannschmidt/borg,raxenak/borg,edgimar/borg,edgewood/borg,RonnyPfannschmidt/borg,edgimar/borg