Pour dried beans onto a rimmed baking sheet and quickly pick through them, removing and discarding any broken beans or stones. Place beans in a large nonreactive bowl and cover them with at least 3 inches of cold water. Allow to soak overnight or at least 8 hours. After beans have soaked, drain in a colander. Place in a large saucepan and cover with at least 2 inches of cold water. Heat oven to 400°F. Peel the onion and halve it lengthwise. Leave one half whole; coarsely chop the other half and set it aside for the seasoning paste. Remove stems from chiles and slit them open to dump out the seeds. Place chiles on a baking sheet and toast them in the oven for 1 to 2 minutes, or until they are crisp and fragrant. Place them in a small bowl and cover with very hot water; allow to soak for at least 15 minutes, or until they are soft and pliable. Place the onion half, celery, carrot, garlic cloves, and bay leaves into the pot containing the beans. Bring to a boil over high heat, then reduce heat and gently simmer the beans until they are almost completely tender but still a little starchy in the center, about 30 minutes. (Beans should not be completely done, as they will cook for another 20 minutes with the spice blend and beer.) Season the beans well with salt and remove the pot from heat. Heat a small sauté pan over medium-high heat. Add cumin and coriander seed, and lightly toast them until fragrant. Remove from the pan and set aside. Remove ancho chiles from the soaking water, and coarsely chop them. Combine chiles, reserved chopped onion, serrano pepper, tomato, oregano, 1/4 cup of the beer, salt, and toasted cumin and coriander seed in a blender, and process until smooth. Strain the beans, and discard the onion half, celery, carrot, garlic cloves, and bay leaves. Place about 1 cup of cooked beans in a small mixing bowl. Use a potato masher or the back of a fork to coarsely crush them. Heat oil in a large, heavy pot over medium-high heat. When it is smoking hot, add puréed mixture and fry it for 3 minutes or until fragrant, stirring occasionally with a wooden spoon. Mix in crushed and whole beans and the rest of the beer. Simmer beans uncovered for 20 minutes. Stir in chopped cilantro and lime juice. Season with salt.