virfdstream: Use messages instead of pipe
virfdstream: Use messages instead of pipe

One big downside of using the pipe to transfer the data is that
we can really transfer just bare data. No metadata can be carried
through unless some formatted messages are introduced. That would
be quite painful to achieve so let's use a message queue. It's
fairly easy to exchange info between threads now that iohelper is
no longer used.

The reason why we cannot use the FD for plain files directly is
that despite us setting noblock flag on the FD, any
read()/write() blocks regardless (which is a show stopper since
those parts of the code are run from the event loop) and poll()
reports such FD as always readable/writable - even though the
subsequent operation might block.

The pipe is still not gone though. It is used to signal the event
loop that an event occurred (e.g. data is available for reading
in the queue, or vice versa).

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

nertpinx/libvirt,olafhering/libvirt,jardasgit/libvirt,olafhering/libvirt,crobinso/libvirt,olafhering/libvirt,eskultety/libvirt,jardasgit/libvirt,nertpinx/libvirt,zippy2/libvirt,jfehlig/libvirt,VenkatDatta/libvirt,eskultety/libvirt,jardasgit/libvirt,jfehlig/libvirt,olafhering/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,zippy2/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,libvirt/libvirt,datto/libvirt,datto/libvirt,nertpinx/libvirt,crobinso/libvirt,andreabolognani/libvirt,eskultety/libvirt,eskultety/libvirt,VenkatDatta/libvirt,crobinso/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,libvirt/libvirt,fabianfreyer/libvirt,datto/libvirt,zippy2/libvirt,crobinso/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,zippy2/libvirt,libvirt/libvirt,datto/libvirt,libvirt/libvirt,nertpinx/libvirt,andreabolognani/libvirt,eskultety/libvirt,andreabolognani/libvirt,datto/libvirt,nertpinx/libvirt,jfehlig/libvirt,andreabolognani/libvirt