erasure-code: ErasureCode base class

Add the ErasureCode base class for ErasureCodeJerasure, for methods that
can be shared among all plugins.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: move to ErasureCode::{encode,decode}{,chunk}

The bulk of ErasureCodeJerasure::encode and ErasureCodeJerasure::decode
is dealing with alignment and buffer allocation. This is moved to
ErasureCode::encode and ErasureCode::decode respectively.

The jerasure specific code is isolated in the new
ErasureCodeJerasure::encode_chunks and
ErasureCodeJerasure::decode_chunks virtual functions.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: move to ErasureCode::minimum_to_decode*

The ErasureCodeJerasure::minimum_to_decode and
ErasureCodeJerasure::minimum_to_decode_with_cost methods are moved
verbatim to the base class ErasureCodeJerasure.

Signed-off-by: Loic Dachary <loic@dachary.org>