Appeals court allows Trump to withhold billions in foreign aid