reader/writer/conn: refactoring

* make Conn public
* move transport responsibilities into Conn from Reader/Writer
* supply callbacks for hooking into Conn events
* name anon cleanup func; add to wg
* ensure that readLoop exits before exiting cleanup
* always check messagesInFlight at readLoop exit
* close underlying connection last