qemu-iotests: add add-cow iotests support

This patch will use qemu-iotests to test add-cow file format.

v17-v18:
1) add 037 and 038 tests.

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>

Conflicts:
	tests/qemu-iotests/common.rc
make path_has_protocol non static

We will use path_has_protocol outside block.c, so just make it public.

Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
qed_read_string to bdrv_read_string

Make qed_read_string function to a common interface, so move it to
block.c.

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
rename
rename qcow2-cache.c to block-cache.c

We will re-use qcow2-cache as block layer common cache code,
so change its name and made some changes, define a struct named
BlockTableType, pass BlockTableType and table size parameters to
block cache initialization function.

v17-v18:
1) move struct to source file.
2) cluster_size->table_size.

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>

Conflicts:
	block/block-cache.c
	block/qcow2-cluster.c
	block/qcow2-refcount.c
	block/qcow2.c
	block/qcow2.h
	trace-events
rename V19

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
add-cow file format core code.

add-cow file format core code. It use block-cache.c as cache code.
It lacks of snapshot_blkdev support.

v17-v18:
1) use error_report, not fprintf.
2) remove version field from header.
3) header_size is MAX(cluster_size, 4096).
4) introduce s->cluster_sectors.
5) use BLKDBG_L2_LOAD/UPDATE.

v16->v17:
1) Use stringify.

v15->v16:
1) Judge if opts is null in add_cow_create function.

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>

Conflicts:
	block/block-cache.c
fix bugs.