From humble lane-style buildings to grand block apartments, Shanghai’s historic residential architecture tells the story of a city in transformation.