logger: avoid using SIGHUP for detecting death of sheep

It seems that current method of detecting sheep's death from logger
process sometimes fails. The SIGHUP is caught as a request of log
rotation.

The problem comes from that SIGHUP is used for both of log rotation
request and death detection, and getppid() somestimes returns value
not equal to 1 when SIGHUP which is caused by the death rises.

This patch lets logger detect death of sheep viapolling. The detection
mechanism is simple: calling getppid() at the tail of the log flush
loop every time. It would be enough for practical death detection.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
dog: use a minimum number of copies and zones for vdi checking

Current sheepdog allows the condition of a number of zones < a number
of copies. But "dog vdi check" cannot handle the case well because it
tries to create copies of lost/corrupted objects based on
inode->nr_copies.

This patch lets "dog vdi check" create a minimum number of copies and
zones.

Reported-by: Marcin Mirosław <marcin@mejor.pl>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>