dog: repair objects based on majority vote

Current object repair strategy of "dog vdi check" doesn't work well if
objects are corrupted. This patch adds a mechanism for majority voting
in the command.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>

Conflicts:
	dog/vdi.c
Conflicts were resolved by Hitoshi Mitake.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
tests/functional: add a new test for lost and corrupted objects

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>

Conflicts:
	tests/functional/group
Conflicts were resolved by Hitoshi Mitake. In addition, the test was a
little bit modified for stable-0.7.

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