The State Education Department and New York’s teachers’ unions have reached a deal to overhaul teacher evaluations and tie them to student test scores, brokering a compromise on an issue the unions had bitterly opposed for years.