embed std.io.Writer in PosixTty with 4096-byte buffer
Integrate Zig 0.15.1's new Writer API into the PosixTty structure by
embedding a std.io.Writer field with a 4096-byte buffer. This provides
buffered writing capabilities with proper VTable implementation.
The embedded writer uses @fieldParentPtr to access the parent PosixTty
instance from the drain function, enabling efficient writes to the
terminal file descriptor when the buffer is full or flushed.
Updated write() and opaqueWrite() methods to use the embedded writer
instead of direct posix.write() 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>