sheep: make the vid deletion proceduer correct order

Current VDI deletion process deletes VDI in this order:
1. delete objects which belong to the VDI
2. notify deletion of the VDI for removing object list cache
3. clear inode object with zero

But this should be like this:
1. delete objects which belong to the VDI
2. clear inode object with zero
3. notify deletion of the VDI for removing object list cache

Because in the process of removing object list cache, existing of the VDI is
checked with the name of the VDI is zero-cleared or not
(objlist_deletion_work()). So objlist_deletion_work() would have a possibility
of leaving the object list cache incorrectly. This patch makes the process
correct order.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
sheep: initialize vdi bitmap after completion of reading inode object

Current init_objlist_and_vdi_bitmap() sets a bit of corresponding VDI
before initializing the VDI. This should be done after the
initialization for defensive purpose.

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

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
dog: add 'vdi cache purge' option

This command is intended to be used when

1. cache of some vdi isn't clean on node A, e.g, due to sheep crash
2. This vdi is run on other node B.

After some time, A comes back without manually 'rm cache/', the cache about this
vdi is stale. For this case, we provide a manual option for users to purge the
stale cache.

usage:
 $ dog vdi cache purge image # purge cache of image
 $ dog vdi cache purge # purge cache of all the images

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
dog: check the result of dog_exec_req() correctly

dog_exec_req doesn't return a result code after the commit 5940548.
We have to check rsp->result instead of its return value.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
dog: add more result check of dog_collie_exec()

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: don't remove vdi object from object list cache

We don't remove a vdi object from the underlying store even after the
vdi is deleted.

Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>