In a 12-quart stockpot, sauté the onions, shallots, leeks, scallion whites, garlic and a heavy pinch of salt in 2 tablespoons oil until the onions begin to caramelize. Deglaze with red wine. Add the thyme and stock to the pot. Bring the soup to a boil, reduce heat to low, and simmer for at least 1 hour. Adjust the seasoning with salt and pepper.
While the soup is simmering, preheat the oven to broil. Toss the bread coins with the remaining 2 tablespoons oil and place flat on a sheet pan. Toss the scallion greens with the Gruyere, and top each coin with the mixture. Bake on a rack in the middle of the oven for 3 minutes and then transfer to the broiler to lightly brown the tops. The cheese should be bubbly. Ladle the soup into bowls and top with croutons.