PNaCl: refactor with generalized message parser and string pool