linux: make hwloc_linux_find_kernel_nr_cpus() reentrant
linux: make hwloc_linux_find_kernel_nr_cpus() reentrant

Don't use the static nr_cpus variable for intermediate
computation (in case we ever have multiple threads do the
initialization loop in parallel).
Only change nr_cpus during exit.
Other threads will either see the new value and do nothing,
or see the initial -1 and do the loop too (and find the same
value).

May matter if we ever have multiple threads build their
own topology in parallel.

git-svn-id: 14be032f8f42541b1a281b51ae8ea69814daf20e@4932 4b44e086-7f34-40ce-a3bd-00e031736276

BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc