Add CloseWrite() method to enable TCP-like half-close semantics without
protocol changes. This allows one side to signal EOF while still receiving
data from the peer.
Changes:
- Add chWriteClosed channel to track local write-side closure
- Add CloseWrite() method that sends FIN but keeps read side open
- Modify writeV1/writeV2 to check local write state instead of remote FIN
- Update Close() to also close write side for backward compatibility
The existing cmdFIN protocol command is reused - CloseWrite sends FIN to
signal write completion while the stream remains readable.
Usage:
stream.Write(data)
stream.CloseWrite() // send FIN, can still read
io.ReadAll(stream) // read peer's response