Adding a simple stream.Duplex example

Per issue #8776, adding a simple example of a stream.Duplex implementation to the docs. The example duplex is admittedly limited in function but it illustrates the key bits.