embed std.io.Writer in WindowsTty with 4096-byte buffer
Apply the same Writer API integration to WindowsTty that was done for
PosixTty. This provides consistent buffered writing capabilities across
both Windows and POSIX platforms using Zig 0.15.1's new Writer API.
The embedded writer uses @fieldParentPtr to access the parent WindowsTty
instance from the drain function, enabling efficient writes to the
Windows console handle when the buffer is full or flushed.
Add write() method and update opaqueWrite() to use the embedded writer
instead of direct windows.WriteFile() calls, providing automatic
buffering for better performance by reducing system call overhead.
Amp-Thread-ID: https://ampcode.com/threads/T-e1192d32-b3c3-43a6-b434-33fe5664bf0a
Co-authored-by: Amp <amp@ampcode.com>