net: a few small cleanups before replacing boost threads