The court’s rebuke deals a blow to States that have championed demolitions as a tough-on-crime tactic, often targeting minority communities.