Be more careful about marking resources as broken

Only mark a resource as broken if it has been broken for at least 3
consecutive checks over a period of at least 3 days.

Needs tests.