Preheat oven to 375°.
On a lightly floured surface, unroll 1 piecrust. Lightly brush with water. Unroll remaining piecrust, and place on top. Roll into a 12-inch circle. Transfer to an 11-inch removable-bottom tart pan, pressing into bottom and up sides. Trim edges. Lightly cover with parchment paper, and add pie weights.
Bake until light golden brown, 12 to 15 minutes. Remove paper and weights. Let cool slightly.
In a large saucepan, cook bacon over medium-high heat, stirring occasionally, until crispy, about 15 minutes. Using a slotted spoon, remove bacon, and let drain on paper towels. Add onion to pan. Reduce heat to medium, and cook, stirring occasionally, until tender, about 5 minutes. Stir in sugar, and cook until golden brown, about 5 minutes. Using a slotted spoon, remove onion mixture, and let drain on paper towels.
In a large bowl, whisk together eggs, cream, mustard, thyme, salt, nutmeg, and pepper until smooth. Stir in half of bacon and half of onion mixture. Pour into prepared crust. Sprinkle with cheese, remaining bacon, and remaining onion mixture.
Bake until puffed and golden brown, about 25 minutes. Let cool slightly. Garnish with thyme, if desired. Serve warm or at room temperature.