examples/interactive-tcp.hs: Use a better monad, clean up code a bit