Add an explanation of when a function should be marked coroutine_fn

Coroutine functions that can yield directly or indirectly should be annotated
with a coroutine_fn annotation. Add an explanation to that effect in
include/block/coroutine.h.
Rename qemu_coroutine_self to qemu_coroutine_self_int and add an annotated wrapper

While it only really makes sense to call qemu_coroutine_self() in a coroutine
context, some coroutine internals need to call it from functions not annotated
as coroutine_fn, so add an annotated wrapper and rename the implementation
versions to qemu_coroutine_self_int.
Explicitly mark BlockDriver function .bdrv_create as coroutine and rename it bdrv_co_create.
Convert .bdrv_open and .bdrv_file_open to coroutine_fn
Make qcow2_open synchronous

The previous patch convert all .bdrv_open functions to run from a coroutine context. However
qcow2's open method is also called from qcow2_invalidate_cache. bdrv_invalidate_cache is mainly
called by migration.c, which doesn't run in coroutine context, so rather than propagating
coroutine_fn annotations up the call chain, turn qcow2_open into a synchronous wrapper.
Explicitly mark BlockDriver functions .bdrv_write and .bdrv_read as coroutine functions

Convert .bdrv_write and .bdrv_read to coroutine functions and rename them to .bdrv_co_write and
.bdrv_co_read.
Call bdrv->open via a synchronous wrapper in block/snapshot.c

block/snapshot.c calls bdrv->open directly from a non-coroutine context. Provide a synchronous
wrapper to ensure correctness.
Convert bdrv_create and associated functions to be coroutine_fn

This patch converts bdrv_create, bdrv_create_file and bdrv_img_create to be
coroutine only functions. It adds a synchronous wrapper, bdrv_sync_create, for
any synchronous callers.
Add a synchronous wrapper bdrv_sync_rwco

A number of functions in block.c pass an RwCo struct to a coroutine entry point in order to
synchronise an asynchronous function. This patch factors this pattern out into a function.
Convert bdrv_read, bdrv_write and associated functions to coroutine functions

Now that .bdrv_co_read and .bdrv_co_write are only called in a coroutine
context, convert their callers in block.c to be coroutine only, and add
bdrv_sync_* versions for synchronous callers.
Make bdrv_discard coroutine only and add bdrv_sync_discard

This patch renames the coroutine only bdrv_co_discard to bdrv_discard and the original
bdrv_discard to bdrv_sync_discard. bdrv_sync_discard is synchronous only.
Make bdrv_flush coroutine only and add bdrv_sync_flush

This patch renames the coroutine only bdrv_co_flush to bdrv_flush and the
original bdrv_flush to bdrv_sync_flush. bdrv_sync_flush is synchronous only.
This patch also converts a caller in block/mirror.c to coroutine_fn.
Introduce a run_handler function in qemu-img.c

qemu-img doesn't run in a coroutine context, but uses block layer functions
which do need to run in a coroutine context. This patch converts qemu-img to
run the various qemu-img functions in a coroutine context correctly.
Add coroutine annotations for qemu_co_rwlock_rdlock and qemu_co_rwlock_wrlock

qemu_co_rwlock_rdlock and qemu_co_rwlock_wrlock can only run in a coroutine
context, so annotate them with coroutine_fn.
Add coroutine_fn annotations to nbd_co_* functions.

nbd_co_* are all meant to be only be run in a coroutine context, annotate them accordingly.