Analysis of Thermal Processes during Friction Stir Welding of Metals