[Cherrypicking] dataplane: remove EventPoll in favor of AioContext

During the review of the dataplane code, the EventPoll API morphed itself
(not concidentially) into something very very similar to an AioContext.
Thus, it is trivial to convert virtio-blk-dataplane to use AioContext,
and a first baby step towards letting dataplane talk directly to the
QEMU block layer.

The only interesting note is the value-copy of EventNotifiers.  At least
in my opinion this is part of the EventNotifier API and is even portable
to Windows.  Of course, in this case you should not close the notifier's
underlying file descriptors or handle with event_notifier_cleanup.
dataplane: fix hang introduced by AioContext transition

The bug is that the EventNotifiers do have a NULL io_flush callback.
Because _none_ of the callbacks on the dataplane AioContext have such a
callback, aio_poll will simply do nothing.  Fixed by adding the callbacks:
the ioeventfd will always be polled (this can change in the future to
pause/resume the processing during live snapshots or similar operations);
the ioqueue will be polled if there are outstanding requests.

I must admit I have screwed up my testing somehow, because commit
2c20e71 does not work even if cherry-picked on top of 1.4.0, and this
patch fixes it there as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 485e3ce88e8af0e5311dd626f399b3a1e0846dd6)
[Cherrypicking] virtio-blk: Do not segfault fault if failed to initialize dataplane

    virtio-blk: Do not segfault fault if failed to initialize dataplane

    $ ~/usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -drive if=none,id=drive0,cache=none,aio=native,format=raw,file=/root/Image/centos-6.4.r
    qemu-system-x86_64: -device virtio-blk-pci,drive=drive0,scsi=off,x-data-plane=on,config-wce=on: device is incompatible with x-data-plane,
    *** glibc detected *** /root/usr/bin/qemu-system-x86_64: free(): invalid pointer: 0x00007f001fef12f8 ***
    ======= Backtrace: =========
    /lib64/libc.so.6(+0x7d776)[0x7f00153a5776]
    /root/usr/bin/qemu-system-x86_64(+0x2c34ec)[0x7f001cf5b4ec]
    /root/usr/bin/qemu-system-x86_64(+0x342f9a)[0x7f001cfdaf9a]
    /root/usr/bin/qemu-system-x86_64(+0x33694e)[0x7f001cfce94e]
    ....................

     (gdb) bt
     #0  0x00007f3bf3a12015 in raise () from /lib64/libc.so.6
     #1  0x00007f3bf3a1348b in abort () from /lib64/libc.so.6
     #2  0x00007f3bf3a51a4e in __libc_message () from /lib64/libc.so.6
     #3  0x00007f3bf3a57776 in malloc_printerr () from /lib64/libc.so.6
     #4  0x00007f3bfb60d4ec in free_and_trace (mem=0x7f3bfe0129f8) at vl.c:2786
     #5  0x00007f3bfb68cf9a in virtio_cleanup (vdev=0x7f3bfe0129f8) at /root/Develop/QEMU/qemu/hw/virtio.c:900
     #6  0x00007f3bfb68094e in virtio_blk_device_init (vdev=0x7f3bfe0129f8) at /root/Develop/QEMU/qemu/hw/virtio-blk.c:666
     #7  0x00007f3bfb68dadf in virtio_device_init (qdev=0x7f3bfe0129f8) at /root/Develop/QEMU/qemu/hw/virtio.c:1092
     #8  0x00007f3bfb50da46 in device_realize (dev=0x7f3bfe0129f8, err=0x7fff479c9258) at hw/qdev.c:176
    .............................

    In virtio_blk_device_init(), the memory which vdev point to is a static
    member of "struct VirtIOBlkPCI", not heap memory, and it does not
    get freed. So we shoule use virtio_common_cleanup() to clean this VirtIODevice
    rather than virtio_cleanup(), which attempts to free the vdev.

    This error was introduced by commit 05ff686536f408ba6e8426b1b54d25bd3379fda2
    recently.