nbd-server: fix dosockopts() to report errors

The purpose of this change is to separate error reporting from error
handling and hence make dosockopts() usable also in other calling
contexts. dosockopts() reports errors in setting socket options and then
it's up to the caller to decide how to react to those errors.

This is a step towards more uniform and robust error management. Similar
changes needs to be done to other functions as well.

Signed-off-by: Tuomas Jorma Juhani Räsänen <tuomasjjrasanen@tjjr.fi>
nbd-server: fix dup_serve() to accept a const server pointer

dup_serve() does not modify the source server (as it should be), so the
pointer should be declared const.

Signed-off-by: Tuomas Jorma Juhani Räsänen <tuomasjjrasanen@tjjr.fi>
nbd-server: fix append_serve() to accept a const server pointer

Now that dup_server() accepts const pointer, append_serve() can also
accept const pointer. There should not be any need to modify the server
when appending it to the array.

Signed-off-by: Tuomas Jorma Juhani Räsänen <tuomasjjrasanen@tjjr.fi>