Analysis and Optimization of Thermal Environment in Old Urban Areas from the Perspective of “Function–Form” Differentiation