Listen to the return value of the Platform::WriteFile() call within PlatformPOSIX::PutFile() in case we write less than we wanted to. Also adjust the input stream's offset in such cases.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@217999 91177308-0d34-0410-b5e6-96231b3b80d8