Refactor external type encoder/decoder to byte payloads, add generic
external type with both domain and type, deprecate
UnsupportedExternalTypeRecord.