British lawmakers have backed legislation that would legalize assisted dying for adults with six months or less to live.