xnbd, xnbd_server: fix disconnect and unload module flow

Session teardown may be invoked by:
- Target disconnect initiation
- User initiated portal deletion
- module unload

This patch fixes session teardown flow to do proper
cleanup of allocated resources and synchronous wait
for all threads/contexts to gracefully terminate.

We first wait for all xnbd/xio connections and
contexts to disconnect and exit, and then we destroy
the session.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
xnbd, xnbd_server: Add destroy remote session command

This command will free and destroy all server resources that
were allocated during remote session setup.

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
xnbd_server: remove unneeded code in xnbd_handle_destroy

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
xnbd_server: add correct bs removal to xnbd_handler_free_portal_data

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
xnbd: move session removal from list to beginning of xnbd_session_destroy

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
xnbd_server: fix compilation error

Detected in gcc version 4.8.2

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
xnbd_server: free all created portal data instead of one only

Signed-off-by: Max Gurtovoy <maxg@mellanox.com>