Adding codec abstraction for compatibility

The `Codec` class has been added to support Snappy-Xerial
compatibility in the Producer. Without this, Java-based
consumers will be unable to decode messages produced
by non-Xerial Snappy producers.