The U.S. Supreme Court ruled that victims of overseas atrocities can’t use a centuries-old law to sue foreign corporations for complicity, blunting what once was a favorite legal tool for human-rights advocates.