We peel the shallots and slice, yielding ¾ cup. After the onions have cooked for 7 minutes, we add the shallots and increase the heat to medium low. We cover again and clean the leeks.
We trim the leeks and halve the two larger ones. We slice them and put them in a large bowl of water. We swish them around and let the dirt settle to the bottom.
We stir the onions and shallots occasionally, we want the onions nice and golden when we add the cleaned leeks.
We drain the leeks on a paper-towel lined plate, scooping them out and leaving the sandy water behind. We add them to the pot after the onions have cooked for 22 minutes. We cook for 5 minutes over medium heat, stir again, add a little salt and pepper, and continue to cook uncovered.
After another 15 minutes of stirring the onion mixture occasionally, the onions are nicely carmelized and the bottom of the part is getting dark. We add the sherry and stir to pick up the browned bits on the bottom of the pot. After a minute, we add the stock and 4 whole sprigs of thyme and partially cover the pot. We bring the mixture to a simmer and then lower the heat. We cook for another 20 minutes to meld the flavors.
Meanwhile, we resuscitate our dried mushrooms. We bring 1 cup of water to a boil and pour over the mushrooms in a medium bowl. We set aside for 15 minutes. Then we pick out the mushrooms and rinse to be sure to get rid of any dirt. We put the porcini on the cutting board and coarsely chop. We strain the liquid that the porcini were soaking in through a paper towel lined fine strainer, yielding ¾ cup of liquid.
When the soup is just about ready to be served, we add the chopped porcini and the strained liquid. We raise the heat and simmer for a few minutes. We remove the thyme sprigs, taste for seasoning, and serve garnished with thyme leaves.