Special equipment: 12-inch fluted ring with a removable bottom, or a 12-inch flan ring Baking stone (optional)
To prepare the dough: In the bowl of a food processor fitted with the steel blade, or, in the bowl of an electric mixer fitted with the paddle attachment, combine the flour and salt and pulse or mix on low to incorporate. Add the butter and pulse a few times or mix on low, until it is the consistency of a fine meal. Add the milk and pulse or mix on low until the dough barely comes together.
Turn the dough out onto a lightly floured work surface. Dip the heel of your hand in flour and, working with small sections, smear the dough away from you to blend it together. When the dough has been all smeared out, using a metal scraper or spatula, scrape and gather it together and knead a few times to gather into a ball. Flatten into a disc, and wrap in plastic to chill until firm, about 1 to 2 hours or overnight.
In a large saucepan, over low heat, combine the olive oil, onions, salt, and pepper. Add 1/2 of the sherry and cook slowly for about 45 minutes to an hour until caramelized, stirring occasionally. Stir in another tablespoon of sherry, to taste, and set aside to cool.
On a lightly floured surface, roll the dough out to a circle, 1/8-thick, flouring the surface of the dough as necessary. Line the tart ring with the dough and chill until firm, about 30 minutes.
Remove the oven rack from the oven and place the baking stone directly on the floor of the oven. If you don't have a baking stone, you'll still need to remove the rack and place the tart on a baking sheet directly on the floor of the oven. Preheat the oven to 375 degrees F. at least one hour before baking to warm up the baking stone.
Evenly distribute the onions over the dough. Cover the tart loosely with foil, taking care that the foil doesn't touch the tomatoes.
Bake for 1 1/2 hours. About 30 minutes before the tart is done, remove it from the oven and lift off the foil. Evenly distribute the olives, anchovies and thyme sprigs on top, and return the tart to the oven to finish baking.