change interval formatting in config

All intervals are now in milliseconds. But you can add
multiples ("ms", "s", "m", "h", "d", "M", "y") to set
value using different units.

For example, value "1.5h" would mean 1.5 hours.
implement nginx-like logic to avoid hitting upstream when it's down
count each failed request only once