Emulator: Enhance qemu_pipe.h to handle partial rw

Partial read and write happen and it is better to try again
unless there is some hard error. This is meant to fix some
flaky behavior of emulator pipe services, hopefully.

BUG: 35207286

manually tested this on emulator image.

(cherry picked from aosp f099dce4a622f2ece313abe71a422489704ee692)

Change-Id: I26a4560fa34e979939edcc882fcc5190202fe9f6
1 file changed