Cleanup the coordinator and worker processes.