Explicitly call disconnect for each CoreNetwork, process events, then
wait for each network to disconnect before deleting it.
This overwrides the automatic cleanup in CoreNetwork to handle
shutting down tens of networks at once. This allows all CoreNetworks
to start disconnecting at once before waiting for each to individually
shut down.
Resolves GH-207.
(cherry picked from commit
d414dd5212cc00f1d43615528bb97470a65143b5)