Add a performance hack for writing variable message headers.
It speeds up a ping-pong benchmark with a 512 long byte array payload by about 10%.