Use writer directly in formatter.

Write directly to the fmt.State output writer to avoid the overhead
of a buffer in the formatter code.