Encode HTLC failure packets in a util method on `HTLCFailReason`