In a large heavy-bottomed stockpot, melt the butter and oil over medium-high heat. Add the onions and sauté until softened.
Turn the heat down to medium-low and continue to sauté until browned and caramelized (but not burnt), about 30-40 minutes, stirring every few minutes.
Add garlic and sauté for an additional 1-2 minutes. Stir in the flour and cook for an additional 1 minute.
Pour in the cognac (optional) and dry white wine to deglaze the pan, using a wooden spoon to scrape up any browned bits on the bottom of the pan. Cook off the wine until the onions are almost dry again.
Add the cooking stock, bay leaves, thyme sprigs, and parsley.
Cover and bring to a simmer. Simmer for at least 10-15 minutes to allow flavors to meld.
Season with salt and pepper to taste.
Discard the bay leaves, sprigs of thyme, and parsley.
Preheat oven broiler.
When ready to serve the soup, place your oven-safe bowls [See Note 6] or crocks on a rimmed baking sheet. Ladle the soup into each of them, then top with a baguette slices (or croutons, or rusks) and cheese (I used about 1/4 cup shredded cheese for each). Place on an oven rack about 6 inches from the heat and broil for 2-4 minutes until the cheese is melted and bubbly.
Remove and serve immediately.