Scotland's semi-autonomous parliament has voted down an assisted dying bill that would have allowed terminally ill adults to end their lives.