Add serialize/deserialize for REPR NFA