check-ping.rb: Try ping multiple times

This patch modifies `check-ping.rb` so that it can try ping multiple times and check the successful ratio rather than single ping result.
Fixed in 604c209. We still need `unless i == 0` to avoid sleeping before the first ping.