Members of the United Auto Workers voted to ratify a contract with General Motors, marking the first of the Big 3 U.S. carmakers to conclude its weekslong strike.