Exact relations between damage spreading and thermodynamic functions for the N-color Ashkin–Teller model