Move helper tools from `tests/` to `libp2p/tools/`, and some mildly-related cleanups.