fix assert when shutting down

git-svn-id: http://libtorrent.googlecode.com/svn@9879 f43f7eb3-cfe1-5f9d-1b5f-e45aa6702bda
fix shutdown assert properly

git-svn-id: http://libtorrent.googlecode.com/svn@9880 f43f7eb3-cfe1-5f9d-1b5f-e45aa6702bda