The European Court of Justice on Friday dealt a blow to environmental groups trying to stop wind farms from being built in Spain’s northwestern Galicia region, in a ruling affecting billions of euros of investment. Companies developing wind farms in …