switch Decoder to a factory pattern

This should be way easier to read and less error-prone. But then, now
parts of the code look a bit fishy (BerlekampWelchDecoder..).

Unit tests are completing so I'm commiting this for now, will review
again later.