The effort to repeal the long-dormant law, which bans all abortions except those done to save a patient’s life, won final legislative approval Wednesday in a 16-14 vote of the Senate, as two GOP lawmakers joined with Democrats.