HPCC-12183 Component Cleanup with HPCC-12093 dependencies

re-target from master to candidate-5.0.4
Why are you calling cleanup_component when you have determined that the component has already stopped? is that primarily for the thor case to ensure slaves stopped too?