erasure-code: move to ErasureCode::decode_concat

It does not belong to ErasureCodeInterface which is supposed to not have
any implementation.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: rework ErasureCode*::parse methods

The ErasureCode::parse virtual function is derived in
ErasureCode{Jerasure,Isa}. It is reworked to share parsing arguments the
various techniques have in common. The logic is otherwise unmodified.

http://tracker.ceph.com/issues/8496 Refs: #8496

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: ErasureCodeInterface::get_chunk_mapping()

Add support for erasure code plugins that do not sequentially map the
chunks encoded to the corresponding index. This is mostly transparent to
the caller, except when it comes to retrieving the data chunks when
reading. For this purpose there needs to be a remapping function so the
caller has a way to figure out which chunks actually contain the data
and reorder them.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: parse function for the mapping parameter

Each D letter is a data chunk. For instance:

    _DDD_DDD

is going to parse into:

   [ 1, 2, 3, 5, 6, 7 ]

the 0 and 4 positions are not used by chunks and do not show in the
mapping. Implement ErasureCode::parse to support a reasonable default
for the mapping parameter.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: remap chunks if not sequential

If the remap vector is not empty, use it to figure out the sequence of
data chunks.

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