On platforms that provide only the 2-argument pthread_setname_np() function, such as illumos, none of the branches in SetOsThreadName() matches, so threads are left unnamed. As pthread_getname_np() is available there, the thread name tests fail.
Introduce the HAVE_PTHREAD_SETNAME_NP_2ARG configuration macro, which represents the availability of that function, and use it in SetOsThreadName().
Platforms already handled by another branch are not affected.
Additionally, the first commit documents the platforms for every branch in SetOsThreadName(), as suggested by ryanofsky in #324.