Nepal ended its search and rescue operations 40 days after devastating floods killed more than 1,400 people and left more than 5,000 missing.