In a large heavy pot over medium heat, saute bacon until fat is rendered and bacon is crispy, 5 to 6 minutes. Transfer bacon to a paper towel to drain. Set aside.
Saute onions and thyme in remaining bacon fat in pan until onions are well caramelized, stirring occasionally, 25 to 30 minutes. Deglaze with vermouth, and cook about 1 minute. Add stock, salt, and pepper to taste. Bring to a boil; reduce heat, and simmer for 30 minutes. Meanwhile, make croutons by toasting bread slices under broiler or in toaster, until golden.
Preheat broiler. Add 1/2 teaspoon sherry and one crouton to each soup bowl. Sprinkle each crouton with 2 tablespoons reserved bacon. Ladle soup into bowls, top with Gruyere, and place on a baking pan. Transfer to oven, and broil until cheese is melted and bubbly, 2 to 3 minutes. Garnish with thyme sprigs, and serve immediately.