Raise the pooled bufio.Writer behind each client's writer from 2 KiB to
8 KiB, so a pass that drains several packets flushes them as one TLS
record instead of overflowing into a record every packet or two. Only
pool-sized writers go back to the pool, and the websocket path now
passes a nil writer like the HTTP path, so every connection draws a
pooled buffer on demand.
Arm the write deadline in an io.Writer under the bufio.Writer, once per
write to the connection, rather than in every frame-building function.
Set the deadline twice the configured write timeout out, and leave it
alone while at least one timeout remains, so a busy client's writer
touches the runtime timer at most once per timeout instead of once per
frame. A write therefore fails between one and two times
--tcp-write-timeout after it starts, rather than exactly once.
Add BenchmarkWriterBatch and BenchmarkSetWriteDeadline to measure both.
Updates tailscale/corp#50628
Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>