Devastating floods in Libya broke dams and swept away entire neighbourhoods, killing more than 5,000 people.