Peel and chop the garlic. Sprinkle with 1 tsp. salt, and with the side of a heavy chef’s knife, mash to a paste. Transfer to a food processor and add the onion, tomatoes, chopped cilantro stems and leaves, lime juice, chiles, ginger, and 1/4 tsp. black pepper. Pulse until finely chopped and almost smooth. Put the chicken and shrimp in a large bowl, add the onion mixture, and turn to coat well. Cover and refrigerate for 1 to 2 hours.
Meanwhile, pulse 2 Tbs. of the cashews in a spice grinder just until finely ground; do not let them form a paste.
Remove the chicken from the marinade, brushing excess marinade back into the bowl. Pat the chicken dry with paper towels. Season on both sides with 1/4 tsp. salt. Heat 2 Tbs. of the olive or dendê oil in a 5- to 6-quart Dutch oven over medium heat. Add the chicken and cook, turning once, until very lightly browned on both sides, about 4 minutes per side. Transfer the thighs to a plate as they are browned.
Remove the shrimp from the marinade and set them aside. Put the marinade in the Dutch oven, add the coconut milk and ground cashews, and cook over medium heat, stirring and scraping the bottom of the pan, for 3 minutes to cook off the raw onion flavor.
Return the chicken to the Dutch oven, reduce the heat to low, cover, and simmer, stirring occasionally and turning the chicken halfway through cooking, until the chicken is tender and cooked through, about 25 minutes total.
Increase the heat to medium, stir in the shrimp, and cook, stirring constantly, just until the shrimp are bright pink and nearly opaque throughout, 2 to 3 minutes; they will continue to cook after they’re removed from the heat. Off the heat, stir in half the remaining cashews and half the whole cilantro leaves. Season to taste with salt.
Transfer the chicken to a large deep platter and pour the shrimp and sauce over it. Drizzle with the remaining 1 Tbs. dendê or olive oil, top with the remaining cashews and cilantro leaves, and serve hot with the white rice.