CA-147672: Refactor block-nbd.c before testing tdnbd_queue_{read,write}

Signed-off-by: Flavien Quesnel <flavien.quesnel@citrix.com>
CA-147672: [UnitTest] Add unit tests for tdnbd_queue_{read,write}

Signed-off-by: Flavien Quesnel <flavien.quesnel@citrix.com>