1) In a large soup pot, melt the butter over medium heat. Add the onions, stir to combine with the butter, cover, and cook for 30 mins, stirring occasionally. Remove the cover; increase the heat to medium-high and cook, until the onions are brown and caramelized, about 30 mins. (Stir the onions frequently toward the end of this stage in the cooking, so they do not scorch or burn.) Add the thyme and garlic, saute for two to three mins more. Pour in the wine and scrape up the browned bits from the bottom of the pan with a wooden spoon; simmer until the wine is reduced by about half. Stir in the broth and salt and bring to a gentle simmer. Cover, and cook for 30 mins. Add the Cognac, if using, and season with pepper to taste. (The soup can be made to this point a day ahead and refrigerated.)
2) When ready to serve, pre-heat the grill. Heat the soup and divide it evenly among six heatproof crocks or bowls. Top each soup with a slice of the bread and about 55g of the cheese. Place the bowls on a sheet pan and grill until the cheese is bubbly and brown. Carefully transfer each crock to an under-lining plate. Serve immediately.