For the pie crust: In the bowl of a food processor combine the flour, 1 teaspoon of the salt and 1 stick of the butter and process until mixture resembles coarse crumbs. While the motor is running, add water in tablespoon increments until dough comes together to form a ball. Transfer dough to a lightly floured surface and shape into a flat disk. Cover with plastic wrap and refrigerate overnight or at least for 1 hour.
Remove pie crust from refrigerator and preheat oven to 400 degrees F.
Roll out the pie crust on a lightly floured surface to fit a deep 9 or 10-inch pie pan. Place the dough in the pie pan and crimp edges decoratively. Refrigerate at least 30 minutes, then line with aluminum foil. Fill with pie weights and blind bake for 12 to 15 minutes, or until lightly golden around the edges. Remove foil and pie weights and return to the oven for 3 to 5 minutes. Remove from the oven and brush the surface of pie crust with a light coating of egg white and allow to cool.
For the filling: In a saute pan melt the remaining tablespoon of butter over medium-high heat. Add the ham, or bacon, and cook until browned. Using a slotted spoon, remove the ham from the pan and drain briefly on paper towels, then scatter ham over the bottom of the blind-baked crust. To the fat remaining in the pan, add the sliced onions and thyme and cook, stirring occasionally, until onions are very soft and lightly caramelized, about 6 minutes. Scatter the onions over the bacon in the pie crust and top with the grated cheese.
In a large bowl whisk together the eggs, heavy cream, remaining 1 teaspoon of salt, pepper, and nutmeg. Pour the egg mixture over the ham, onions, and cheese in the pie shell, adding just enough of the egg mixture to come within 1/4-inch of the top of the shell. Bake on the bottom rack of the oven for 45 to 50 minutes, or until the custard is set and quiche is golden brown on top. Allow to cool slightly before serving.