Thousands of critically endangered tortoises in Madagascar have been rescued after they were swept away from their sanctuary and left swimming for their lives in floods.