qemu-nbd: build QAPI block core into qemu-nbd

Compile and link QAPI block core code into qemu-nbd.

This patch circle around unwanted dependecies by stubing some functions in
qmp-stub.c.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
monitor: Split monitor in two parts: core and system.

Since we want to link the monitor.c code with qemu-nbd this patch extracts
system related parts and put them in a separate C module.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qapi: Add a script to filter qmp-commands-old.h to generate a subset of it.

Since qmp-command-olds.h is generated from qmp-commands.hx we will sometime want
to include only a subset of it. For example when linking qapi block commands
with qemu-nbd.

Signed-off-by: Benoit Canet <benoit@irqsave.net>
qemu-nbd: Add --qmp option to qemu-nbd.

This patch add a -qmp parameter to the qemu-nbd command line in order to be able
to manipulate the qemu-nbd block devices via qmp.

This could be used with containers to easily migrate from qemu to a container.

Signed-off-by: Benoit Canet <benoit@irqsave.net>