Fix up EncodeWire/DecodeWire for Enumerations, add tests