Fix and add configuration for healthcheck threshold

Unless I'm misunderstanding something, the node status is incremented on health check failures. The previous check would have always triggered after the first failure. I've changed the behavior to remove a node after a configurable number of consecutive failures.