erasure: make ec_helpers more generic

This will allow us to pass dynamic data and parity combination to make different
erasure coding possible.

At most we support 7 parity strip, which means we can stand with 7 nodes failure
at the same time.

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
erasure: support user-defined redundancy

usage:
$ dog vdi create -c x:y test 10g # create a erasured vdi

x represent number of data strips and y number of parity strips

x can be 2, 4, 8, 16 , 0 < y < 8 and x > y

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
tests/func: add a dedicated test for recovery of erasure code

Current master can't pass it and this bug will be fixed by next patch.

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
lib/fec: fix decode_prepare()

We should skip the null element from 'dp'. This fixes the problem that found
by tests/functional/076

Signed-off-by: Liu Yuan <namei.unix@gmail.com>
journal: remove an obsolete member from struct journal_descriptor

The member epoch in struct journal_descriptor is obsolete. Let's
remove this.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
journal: call panic() when the journaling file is broken

This change makes the journaling subsystem more defensive and enhances the error
logging.

Cc: Kees Bos <k.bos@capitar.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>