CA-141611: write I/O barriers might contain data

Write I/O barriers might contain data to be written, so they must be
treated as a special kind of write. Write I/O barriers carrying data are
simply submitted as a write request, the only difference is the
completion path where the completion callback can be called up to two
times: (a) one for the I/O completion and (b) one when the last pending
non-barrier request completes, in case the I/O completion for the
barrier occurred before that. Otherwise, the I/O completion will proceed
with completing the barrier request.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
Signed-off-by: Felipe Franciosi <felipe.franciosi@citrix.com>
CA-141611: address review comments

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-141611: address review comments

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-141611: address review comments

Simplify way of telling whether data need to be transferred.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>