The president ordered a stop to permits for all wind farms in federal waters. A judge called that “capricious.”