Use ThreadLocal StringBuilder.

Avoids allocation of `StringBuilder` when changing threads name.