Apartment buildings rose in value for years, but surging interest rates loom over the sector’s property owners now.