1. Cook bacon in a large skillet over medium heat until crisp. Add onion, garlic, and mushrooms to pan; cook 5 minutes, stirring frequently. Set aside.
2. Remove and discard giblets and neck from chicken. Place chicken and thyme in a large Dutch oven over medium heat. Cover with 4 1/2 quarts cold water; bring to a simmer. Skim fat from surface; discard. Remove stems and center ribs from Swiss chard. Coarsely chop stems and ribs; reserve leaves. Add stems, ribs, and next 5 ingredients (through apple) to pan; bring to a simmer. Pierce habanero with a fork; add to pan. Cook 35 minutes or until chicken is done.
3. Remove chicken from pan; cool slightly. Remove chicken from bones; chop meat. Discard bones, thyme sprig, and habanero. Strain barley mixture through a sieve over a bowl. Reserve 4 cups of broth for another use. Return remaining 6 cups broth to pan; bring to a boil. Cook 10 minutes. Return chicken and barley mixture to pan; bring to a simmer. Add mushroom mixture. Cook 2 minutes or until thoroughly heated. Stir in 3/4 teaspoon salt and black pepper.
4. To prepare pesto, cook Swiss chard leaves in boiling water 2 minutes. Drain and rinse under cold water; drain. Place leaves, walnuts, and remaining ingredients in a food processor; process until smooth. Serve with soup.