1. Place the butter and olive oil in a large saucepan over moderately low heat. Add the onions, and toss them with the sugar. Cook, covered, stirring occasionally until soft. Uncover and cook over moderate heat, stirring occasionally, until golden brown, about 30 minutes.
2. Add the flour, and cook, stirring for 30-60 seconds. Add the stock, wine, cheesecloth bag, and salt and pepper to taste, and cook, partially covered, skimming off fat occasionally, for 40 minutes.
3. Preheat the oven to 350°. Arrange the slices of bread on a baking sheet; brush both sides with melted butter, season with salt and pepper and bake, turning once, for 15 minutes, or until golden and firm. Rub each slice with the cut garlic.
4. Transfer the soup to individual oven proof crocks, each 4-5 inches across the top. Stir the minced onion and cognac into each crock, dividing evenly. Cover the soup with bread slices, fitting 3 slices into each crock so they cover as much of the surface as possible. Lay the slices of Gruyere over each crock, letting the cheese hang over the sides of the crocks. Sprinkle with grated cheese and drizzle with a little melted butter. Bake for 15 minutes, until the cheese has melted.
5. Run the crocks under a preheated broiler until the cheese is bubbling and lightly browned