Melt the butter in a pot set over medium heat. Add the onion and garlic and cook until tender. Mix in the flour; slowly pour in the stock. Mix in the squash, apple, thyme, cinnamon and nutmeg. Simmer 20 minutes, or until the squash and apples are very tender. Puree in a food processor. Return to the pot and to a simmer. Mix in the cream (if using), salt and pepper. Pour into soup bowls. Garnish each, if desired, with a few thin slices of apple and a small herb sprig.