deinitialize CAnnouncementManager before stopping all (network) services

This is the partial backport of #4725. I thought I'd take the work off your plate. This only really needs merging if 198c45e465e113bd170ec8c5f47770c4fefb88d9 is backported because it causes a crash on win32 during shutdown.