Added mqtt.Encode().

Signed-off-by: Kouhei Maeda <mkouhei@palmtb.net>