separated waitForPeers interval being closed, by channel being closed and peers being found. this is so waitForPeers doesnt resolve when the peers havent actually been found.
added tests for closed state variables. the tests arent as verbose as would be nice but its safe to assume the interval is being cleared now.
Builds on #10
Closes #10 Closes #28 Fixes orbitdb/orbit-db#947