kodo: add layer to allow decoded-aware encoding

This patch adds a generator layer that enables the encoder to exploit
status information from the decoder to only include innovative symbols
in encoded packets.

The layer uses the encoder_status_vector layer to check if status
information from the decoder has been added, and if so, calls the new
generate_status_vector_aware() function in the uniform_generator layer.

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: Steinwurf ApS

NB: When only one new packet is added to an encoder that uses binary
field size, there is a 50% risk that the next non-systematic packet
will be the null-vector, so use with care.
kodo: add decoding status layer based on bitmaps

An on-the-fly decoder tracks seen and decoded symbols. This information
would be nice to have available at the encoder also. To allow for easy
extraction and insertion of such information, this patch adds a new layer
(symbol_decoding_status_bitset) that can replace the two current status
layers: symbol_decoding_status_tracker and symbol_decoding_status_counter.

The new layer uses boost::dynamic_bitset to track symbols, and since
this container already provides count-information, there is no need to
use a counter layer.

To exploit the benefit of using bitsets, the user can copy out the
current (seen|decoded) bitset from the decoder by using get_seen_symbols()
and/or get_decoded_symbols(). To insert the information in the encoder,
simply use set_decoded_symbols() and/or set_seen_symbols().

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: Steinwurf ApS
kodo: make systematic encoder storage aware

If a user chooses to add symbols to an on-the-fly encoder in a
non-chronological order, the systematic encoder will fail, as it uses an
incremental counter to select the next symbol to encode (systematically).

This patch adds a storage tracker layer that maintains a bitmap of
available symbols, and a systematic encoder layer that uses the former
to choose the next symbol to encode.

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: SteinWurf ApS <contact@steinwurf.com>
kodo: add layer to use systematic for last needed symbol

If one is using status vectors to update decoder status at the encoder,
situations might occur, where the encoder tries to encoder over a single
symbol. (E.g. when encoder knows that the decoder was partial complete
and only one new symbol is added.) In this case, the encoder should use
systematic encoding, as it has no other packets to include.

This patch adds a layer to intersect the encoding process, detect
when the above situation occurs, and then use systematic encoding.

The layer relies on the two previous added layers to detect when
systematic should be used: encoder_status_vector
and storage_status vector.

Signed-off-by: Martin Hundebøll <m.hundeboll@gmail.com>
Signed-off-to: SteinWurf ApS <contact@steinwurf.com>