io/channel-tls.c: make qio_channel_tls_shutdown thread-safe