Heat the butter and oil in a sauté pan on medium-low heat. Add the onions, sugar, salt, and pepper, and cook for 30 minutes, stirring occasionally. You may have to turn your heat down to low if you find them caramelizing too quickly. You want them very soft, but not burnt. You can also use the Alton Brown method: put them in an electric skillet set to 300°F, cover and leave undisturbed for 10 minutes, then start stirring every few minutes.
After 30 minutes, add the cognac. Do not pour the cognac directly into the pan from the bottle if there is a live flame; the flame could travel up the pour-stream and into the bottle, causing it to explode. Measure the cognac in a liquid measuring cup, then move the pan off the heat, pour in the cognac, and return the pan to the stove. Let the cognac reduce for 1 minute. Add the wine, beef stock, bay leaf and thyme. Season again with salt and pepper. Simmer on low for another 30 minutes.
Set the onions into a strainer over a bowl to cool to room temperature. Reserve both the onions, and the broth that drains from them.
Preheat the broiler. Spray two individual gratin dishes with non-stick spray, and stand them on a foil-lined baking sheet (to make for easy clean-up).
Take a wonton wrapper in one hand. Dip a finger or small brush in the reserved broth and moisten the entire surface of one side of the wrapper. Place 1 tsp of the onions in the center of the wrapper. Bring all four corners together, pinching and twisting to form a small pouch (called a beggar's purse). Place dumpling, seam side down, into gratin dish. Continue until both dishes are full.
Top each dish with half the Gruyère and half the Parmesan. Dot each dish with 1 tbsp of butter. Pop the dishes under the broiler until the cheese is melted, bubbly and beginning to brown, about 5 minutes. Poke a toothpick into each dumpling and garnish with chives or thyme sprigs.