Lebanon’s parliament selected army chief Joseph Aoun as the country’s president, ending a more than two-year gap.