Make the chili: Put the beans in a Dutch oven or large pot and add enough water to cover. Bring to a simmer over medium-high heat and cook 10 minutes. Drain the beans, return them to the pot and cover with water by about 3 inches. Add the thyme, bay leaves and 4 smashed garlic cloves. Bring to a simmer over medium heat and cook, skimming off any foam, until the beans begin to soften, about 1 hour.
Meanwhile, heat the vegetable oil in a large skillet over medium-high heat. Add the onion and cook, stirring, until golden, about 5 minutes. Stir in the minced garlic, chili powder, ancho chile powder, paprika, oregano, cumin and cloves; cook 1 minute. Add the diced tomatoes and cook, stirring, until thickened, 8 to 10 minutes.
Transfer the tomato mixture to the pot with the beans. Add the pork and 1 teaspoon salt and stir to combine. Bring just to a boil; reduce the heat to medium low and simmer, stirring occasionally, until the beans and pork are tender, about 2 hours. (Add water to keep the pork covered, if needed.) Discard the bay leaves.
Meanwhile, prepare the dumplings: Combine the masa harina, melted butter and 1 teaspoon salt in a large bowl. Stir in 1 1/2 to 2 cups warm water to make a soft dough. Roll the dough into 1-inch balls, then press your thumb into each one to form a cup shape. Cover with plastic wrap until the chili is ready.
Combine the remaining 2 smashed garlic cloves, the cilantro, lime juice, 1 1/2 cups water and 2 teaspoons salt in a blender and puree until smooth. Stir the cilantro mixture into the chili. Gently add the dumplings (do not stir) and simmer until cooked through and firm, 30 to 35 minutes. Thin the chili with a splash of hot water, if needed. Ladle into bowls and top with cheese; serve with lime wedges and sour cream, if desired.