Wait for providers shutdown before closing filters

This change fixes a bug where the server crashed when a shutdown was
initiated while a provider worker was refreshing the catalog. Now, we
wait for provider workers to effectively stop before closing their
filter channels.