Moved DuplexStream into the toplevel so it can be shared among SMTP, POP3, and IMAP