Fix the retry logic when working on all threads of a process
Fix the retry logic when working on all threads of a process

Some callbacks may fail if a thread disappears in the meantime.
If some fail, but not all, try again.
If all failed, but the tid list didn't change, report the last error.

The only case where we could report an error is when all thread
disappear in the meantime and are replaced with as many threads
with the same tids. Very unlikely :)

Thanks to Vlad Roubtsov for the report and testing the patches.

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

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