This also adds substantial test cases. The Read/Write interfaces are dropped as they are not necessary. PiperOrigin-RevId: 300461547
A follow-up change will convert the networking code to use this standard pipe implementation. PiperOrigin-RevId: 297903206