Implement OS-specific support for thread names.
cluster: Fix deadlock when reconnecting.