Federal appeals court says Trump administration wrongly terminated multi-billion program to boost clean energy projects