Merge changes If9782396,If033c815

* changes:
  DO NOT MERGE ANYWHERE Qemu: make the qemu_pipe_open compatible with old apis
  DO NOT MERGE ANYWHERE Emulator: Enhance qemu_pipe.h to handle partial read and write