An Israeli military court on Tuesday sentenced a soldier to 18 months in prison for his deadly shooting of a Palestinian attacker who lay wounded on the ground, capping a nearly year-long saga that has deeply divided the country. The sentence, which included a year’s probation and a demotion in rank, was lighter than expected.