Only post shutdown event to io_service if there is an event loop