sheep: invalidate inode status of other nodes before actual write

Current iscsi coherence protocol can cause inconsistency when a
gateway sheep process dies between inode update and invalidation.

This patch makes sure that inode update must cause invalidation even
if sheep dies before actual inode.

Tested-by: YAMADA Hideki <yamada.hideki@lab.ntt.co.jp>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
dog: fix segfault bug of getting snapshot for "LOCK_STATE_SHARED" VDI.

After iSCSI initiator logins to the iSCSI target of the VDI,
getting snapshot for that volume causes segault.
This patch fixes false loop.

Signed-off-by: Teruaki Ishizaki <ishizaki.teruaki@lab.ntt.co.jp>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
dog/vdi: enable to unlock a vdi locked by tgtd

Explicitly add vdi.type parameter in RELEASE_VDI request.

[Hitoshi: fixed trivial whitespace probelm]

Signed-off-by: YAMADA Hideki <yamada.hideki@lab.ntt.co.jp>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
sheep: remove the duplicate `if` statement

[Hitoshi: trivial cosmetic change]

Signed-off-by: Xiaolong Xu <nxtxiaolong@gmail.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>