qvm: Add basic client interface

These simple interfaces defines basic operations for control virtual machine,
include start VM, shutdown VM ...

Acked-by: huntxu <mhuntxu@gmail.com>
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
vm_control: Add vm_control

This file is aim to provide interfaces which are needed to launch VM.

This patch only introduces an internal simple API control_start_vm(),
with which we can start a VM based on a key-value config file.

This file also includes some key-value file operations, which should be
move to other file(e.g qvm_config.c), but I think this can be
done later.

How it works:
Our config file is divided into following parts:
[qvm]    - Includes some basic information of this VM, e.g. uuid,
            the emulator we used(qemu or qemu-kvm), and so on.
[cpu]    - CPU configuration, e.g. cpu module, cpu number, socket number
[memory] - Memory configuration
[device] - VM device configuration. This is the most complex part. A QEMU device
            includes two parts: guest device and host drive. This part
			includes guest device
[drive]  - Host drive configuration.
[other]  - Other configuration, e.g. usbredir device.

So a config file should be like this:
[qvm]
name = qvm machine
bios = /usr/share/qemu/bios.bin
uuid = 233432934whrewjrewt

[cpu]
number = 2
module = core2duo

[memory]
size = 1024

[machine]
accel = kvm
mem-merge = on

 # Host part of a device
[drive drive-virtio-disk1]
if = none
file = /root/Image/centos-6.4.raw
format=qcow2
cache=none

 # Guest part of a device
[device virtio-disk1]
driver = virtio-blk-pci
drive = drive-virtio-disk1
bus=pci.0
addr=0x5

Our code works like this:
1) Parse this config file, save all option to "struct QVMachine" through
   qvm_machine_build(). "struct QVMachine" is the equivalent of a
   intermediate layer.

2) Then convert "struct QVMachine" to QEMU command line through
   cmdline_build_*()

3) At last, call g_spawn_command_line_async() to lanuch QEMU.

With above config file, we can lanuch a VM using follow command line:
/usr/bin/qemu-system-x86_64 -name "qvm machine", \
-bios /usr/share/qemu/bios.bin -uuid 233432934whrewjrewt \
-machine accel=kvm,mem-merge=on \
-drive id=drive-virtio-disk1,if=none,file=/root/Image/centos-6.4.raw,format=qcow2,cache=none \
-device id=virtio-disk1,driver=virtio-blk-pci,drive=drive-virtio-disk1,bus=pci.0,addr=0x5

Acked-by: huntxu <mhuntxu@gmail.com>
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
vm_control: Parse device option

Parse device and drive option defined in key-value file, save to
"QVMachine->device"

Acked-by: huntxu <mhuntxu@gmail.com>
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
vm_control: build device command line

Build command line of device from QVMachine->device

Acked-by: huntxu <mhuntxu@gmail.com>
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>