Preheat oven to 400°F. Dress the garlic with drizzle of oil, salt and pepper, wrap tightly in a foil pouch and roast to tender 40-45 minutes. Let garlic cool, then squeeze cloves out of their skins and mash into paste.
Meanwhile, heat a soup pot over medium heat. Add oil, 2 turns of the pan and melt in butter. Add onions and garlic, season with salt and pepper. Add bay leaf and ground thyme or thyme bundle, and cook slowly, stirring frequently, until onions are golden and very soft, about 45 minutes. Add sherry and reduce until about 2 tablespoons of liquid are left. Add stock and bring soup to a low boil; simmer 45 minutes.
To serve, remove bay leaf and thyme bundle, if using. Place soup in deep, small bowls and top with a sliced of toast smeared with garlic paste, garlic-side up. Sprinkle garlic toasted with cheese, place bowls 6 inches from broiler and cook until cheese is brown and bubbly.