dog/farm: kill snap file

snap file is used to store [idx, trunk_sha1] pairs, but since we already have
sha1 information in struct snap_log, we don't need it at all and we can directly
store trunk sha1 in snap_log.

Reviewed-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep: add a operation to get cluster info

This is a preparation patch.

Reviewed-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
dog/farm: add snap log header

We don't store any previous cluster state for farm, so we can't restore old state
like redundancy scheme.

This patch introduce a header for snap file and as a side effect, we add a magic
and version check capability for cluster snapshot.

This will break the compatibility of old cluster snapshot. For simplicity, we just
error out if we are operating on the old snapshot data.

Reviewed-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
dog: restore default redundancy scheme for 'cluster snapshot load'

Previously we don't honor the default redundancy scheme after loading cluster
snapshot and we always set it as '3'. With the help of snap log header, we can
restore the default redundancy automatically.

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