The general idea is that, on some low-end devices, we want to avoid
sending health-check queries to the backend at a regular interval,
as this might represent an order of magnitude more queries than
regular traffic.
To do that we instead look at the amount of timeouts and Server Failure
errors occurring with regular queries, and only start doing active
health-checking if these errors reach a certain threshold, temporarily
placing the backend in a 'potential failure' state.
If the health-check queries succeed, we quickly go back to the previous
'Healthy' state and stop sending health-check queries. Otherwise we
place the backend in 'Failed' state and keep sending health-check queries
but a reduced rate, as long as the backend is failing.