Local Cooling during Welding: Prediction and Control of Residual Stresses and Buckling Distortion