Fix tests and benchmarks to avoid manipulating sockets in different threads