For the caramelized onions: In a large skillet, add olive oil over medium-high heat. Add the onions, season with thyme, salt and pepper, and cook, stirring constantly, until the onions begin to soften, about 5 minutes. Deglaze pan with a little white wine. Add ½ cup stock and reduce heat to medium-low; continue cooking, stirring occasionally, adding broth in ½ cup increments when dry, until onions are tender and become dark golden brown, about 45 minutes
For the sandwiches: Butter one side of the sliced bread or cut the side of 6-inch lengths of halved and inverted French bread. Build sandwiches with the buttered sides out; put Camembert, onions and shredded Comte or Gruyere on top of one slice of bread, then cover with remaining slice. Place the sandwich in skillet over medium heat and cover with foil and grill 7-8 minutes. Turn occasionally and press as sandwich turns golden brown. Serve with cornichons and Dijon.