Implemented Encoder::encodeEnum and Decoder::decodeEnum (fixes #31)