Heat oven to 400degrees. Make a bouquet garni by wrapping the bay leaves and the thyme sprigs in a piece of cheesecloth. Set aside. Place the kernels from 1 ear of corn in a baking pan, and roast until lightly browned, about 5 minutes. Remove from oven, and set aside.
Melt butter in a4-quart saucepan over medium heat. Add shallots, garlic, and onion. Cook, stirring often, until translucent, about 4 minutes. Add mushrooms, and continue to cook until mushrooms begin to soften, about 4 minutes more. Using a slotted spoon, remove mushrooms from pan, and set aside.
Add unroasted corn kernels, cauliflower florets, cauliflower core, chicken stock, and bouquet garni to pan. Bring to boil. Reduce heat to low; simmer, covered, until cauliflower is tender and cauliflower core is cooked through, about 25 minutes.
Remove bouquet garni, and discard. Working in batches, puree the soup in the bowl of a food processor until smooth, returning pureed soup to a clean 4-quart saucepan. Heat soup over medium-low heat. Stir in the reserved mushrooms, roasted corn, and cayenne; salt to taste. If soup is too thick, stir in a few tablespoons of water. Heat, and serve immediately.