Refactor NBD client code

The NBD code looks like it was written by a Go newbie.  Clean it up.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>