Analysis of the seismic vulnerability of masonry buildings in historical centres and intervention proposals