A growing number of local governments are restricting or outright blocking large-scale wind and solar projects.