Refactor QEMU_PIPE_RETRY am: 017f41f6c1 am: 3009761946

Change-Id: I8976d7bf9406271f999241855bc8a5d421c49666