miscellaneous +/- (commands, dht, net)

a shared branch of innocuous miscellaneous fixes. Feel free to push. ~~Will be rebased after Dec 1, 01:00 UTC and merged.~~
Does this actually solve the problem? What if a connection is added or remove after the conns call completes and before the loop finishes?