Implemented retries handling.

 It allows specifying how many times pong should try pinging before error callback is invoked.

Did not update the tests or the docs.