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.

Edit: I was wrong. The "< 2" check was to prevent the node from being removed multiple times. I've fixed this by simply removing the node when we hit the threshold.