Soak the beans. In a very large mixing pot, soak the beans in about three times their volume of lukewarm water, for about 12 hours. Drain the beans, add them to a large stockpot, and fill the pot with enough cold water to go a couple inches above the beans.
Simmer the beans. Turn the heat to high and bring to a boil. Then reduce the heat to low, and simmer the beans for about 20 minutes. Use a large metal spoon to remove any foam that has appeared on the surface during this time. Drain the beans and return them to the pot. Again, add enough water to go a couple of inches above the beans.
Add the remaining ingredients and cook the beans. Add the onion, garlic and Epazote. Turn the heat to high and bring to a boil. Then reduce the heat to low, and gently simmer until the beans are tender, at least 1½-2 hours. (Drain if necessary.) Remove Epazote, the larger chunks of onion and skins (the halves will have separated during the cooking). Then remove the head (or heads) of garlic. Once the garlic is cool enough to handle, squeeze the soft cloves out onto a cutting board, roughly chop it, and mix it into the beans.
Cool. Cool the beans to room temperature, or move on to Part Two (below). Once cooled, the soaked, cooked beans can be stored. (Refrigerator: The beans can be refrigerated for up to 5 days in a tightly sealed container. Freezer: You can freeze them in a tightly sealed container for up to a month. They're best when frozen in small batches. To thaw, place them in the refrigerator two days before you want to use them.)