The country’s largest rebel group and the government said they had finally come to an agreement to end a conflict that had lasted 52 years and claimed some 220,000 lives.