Urban Growth and Long-Term Transformations in Spanish Cities Since the Mid-Nineteenth Century: A Methodology to Determine Changes in Urban Density