correct knownNodes maintenance

How to test: run for a few seconds, then see that the state file
contains nodes but it's smart enough to not include self.