Encode/decode bundle messages

This is part of FlowForwarding/LINC-Switch#257.