Strong connectivity in directed graphs under failures, with applications