Retry if scheduler ping fails

* Makes ping interval configurable
* Also adds accessible stop() method to stop workers' keep-alive-threads