Fix thread safety issue in process cleanup
While trying to find the root cause of the occasional failure of the
kademlia test, I found a thread-safety issue here:
When running in parallel mode all worker threads can call the
`SIMIX_process_cleanup()` concurrently which does things such as:
~~~c++
XBT_DEBUG("%p should not be run anymore",process);
xbt_swag_remove(process, simix_global->process_list);
xbt_swag_remove(process, SIMIX_host_priv(process->smx_host)->process_list);
xbt_swag_insert(process, simix_global->process_to_destroy);
~~~
The SWAG are modified concurrently by the worker threads without
synchronization. Sometimes, they go into inconsistent states (for
example, `swag->count` is no more consistent with the number of
elements really in the swag).
This fix might not be the best way to do it.