CA-148137: don't free NBD client if there are pending requests

This patch fixes a bug where we blindly deallocate the NBD client without
checking whether there are pending requests. We address this issue by
marking the client as "dead" and letting the last pending request to
complete to deallocate it.

Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>
CA-148137: unit tests for NBD client

This patch adds unit tests for the NBD client w.r.t. requests failing.

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