PNaCl: major refactoring of request parsing