Wait on shutdown of extra actor systems in tests. See #3217