Cleanup: rename pdu->written -> pdu->outdata_written
Cleanup: rename to payload_* the PDU variables used to track writing to socket