Some fixes for test code (which won't work unless you change the import zhelper line)
fix exception on missing peer
changed logic of peer's exit beacon to remove before seeing if we know it otherwise the peer would be added while being removed