sheep: wait until there is no get_vdis work in wait_get_vdis_done()

There is a race condition like as follows:

 1. Node A, B, and C start up.
 2. Node A receives accept events from B and C, and calls
    start_recovery().
 3. Node A calls wait_get_vdis_done in the recovery thread, but there
    are two get_vdis works in sys->block_wqueue.
 4. When the first get_vdis_done() is called, is_vdi_list_ready will
    be set to false.
 5. Node A starts object recovery without receiving vdi state from C.

To fix the problem, this patch counts the number of get_vdi works in
the block_wqueue.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Reviewed-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: set bit in vdi_inuse in atomic manner

sys->vdi_inuse must be operated in atomic manner because it is
manipulated by multiple threads. This patch implements a new bit
operator atomic_set_bit() and let get_vdis_from() use this.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>