Preheat oven to 350°F.
Melt the butter in a large skillet over medium heat.
Add the onions and Demerara sugar and sauté, stirring frequently, until the onions become tender and start to turn golden.
Sprinkle with salt, pepper, and thyme and mix well. (Do not be tempted to add additional salt - both the anchovies and the olives bring plenty of salt to the recipe.)
Transfer the skillet to the preheated oven.
Cook for 20-30 minutes, stirring occasionally, until the onions are wilted, very soft, and are well caramelized throughout.
Add the vinegar during the last 5 minutes of cooking.
Remove the onions from the oven and set them aside while preparing the pastry for the pissaladière. Let them come to room temperature. **
Raise the oven temperature to 425°F.
Roll out the pastry to 13-inch x 19-inch rectangle.
Place the pastry onto a 12-inch by 18-inch baking sheet, folding the edges of the pastry over about 1/2-inch to create a raised border.
Spread the pastry with the onion confit up to the doubled edges.
Arrange the anchovy filets in a harlequin (diamond) patter and place 1 pitted half-olive in the middle of each diamond.
Bake it for 15 to 18 minutes, until the pastry has puffed up, turned golden, and crisped.
Remove the pissaladière from the oven and sprinkle the olive oil and fresh thyme across the hot surface of the tart.
Cut it into rectangles and serve very warm or at room temperature.