Compound Optimization of Territorial Spatial Structure and Layout at the City Scale from “Production–Living–Ecological” Perspectives