slight refactoring and fixing of a bug where m_impl may be set to 0 on errors sending in set_write_handler()
slight refactoring and fixing of a bug where m_impl may be set to 0 on errors sending in set_write_handler()

git-svn-id: c3635bff6e270807241d5934e964f2d007b3d5d6@5022 a83610d8-ad2a-0410-a6ab-fc0612d85776

archos-sa/libtorrent-avp,halorgium/libtorrent,halorgium/libtorrent,archos-sa/libtorrent-avp,halorgium/libtorrent,archos-sa/libtorrent-avp,archos-sa/libtorrent-avp,halorgium/libtorrent,halorgium/libtorrent,archos-sa/libtorrent-avp,archos-sa/libtorrent-avp,halorgium/libtorrent