Thermally induced residual stresses in eutectic composites