The city’s teachers voted on Tuesday to approve a nine-year labor contract that includes back pay, 18 percent raises, and reforms of the school system.