MSPs have backed a key amendment to Scotland’s assisted dying bill that would limit eligibility to people expected to die within six months.