NYC, teachers union reach preliminary agreement on 9-year contract