Test-Time Scaling Makes Overtraining Compute-Optimal