complete EiEncoder and EiDecoder

Previously EiEncoder and EiDecoder supported only the types used in the
gen_utp driver. Add support for encoding and decoding other ei data types.