Tests now wait for all nodes to finish

As opposed to waiting only for one node to finish
and then waiting on timer for other nodes (which was
slow and not 100% accurate).
Adds state to Node

The algorithm can be divided into few stages where each stage
broadcasts some packet and then waits till it receives the same
packet type from all other contenders. Because this is a distributed
system, one can always receive packets from the next stage.
To prevent acting on it, the state is added.
ping_timeout and max_missed_ping_count can be set at runtime

To speed up some tests.