Fix a bunch of shutdown cleanup tasks. Ensure connections are closed, subscriptions are disposed, try not to log exceptions when exiting under cancellation scenario.