In a medium skillet or saute pan combine the turmeric, chiles, cumin seeds, coriander seeds, cloves, ginger, garlic powder, mustard seeds, pepper, allspice, and cinnamon and cook, shaking the pan frequently, until spices are fragrant and just beginning to smoke. Remove from the heat, transfer to a shallow plate and allow to cool completely. Transfer to a coffee grinder or spice mill and process until very finely ground. Reserve 6 tablespoons of the spice mixture separately and transfer the remainder to an airtight container and save for another purpose.
In a mixing bowl combine the shrimp, 2 tablespoons of the curry powder, 1 teaspoon of the salt and 2 tablespoons of the vegetable oil and set aside, covered, for 20 minutes.
In a large Dutch oven, heat the remaining 2 tablespoons vegetable oil, and, when hot, add the shrimp and cook, turning occasionally, until golden brown on both sides, 2 to 3 minutes. Using a slotted spoon, transfer to a platter or heatproof bowl and set aside. Add the onion, garlic, ginger, thyme, Thai chiles and remaining 4 tablespoons curry powder and cook, stirring, until the vegetables are soft, about 4 minutes. Add the chicken broth, coconut milk, tomatoes, and brown sugar and bring to a simmer. Add the remaining teaspoon of salt, and cook, stirring occasionally, until the sauce has reduced enough to coat the back of a spoon, about 45 minutes. Stir in the shrimp, fish sauce, and cilantro and adjust seasoning, if necessary.
Serve the shrimp and sauce ladled into the center of shallow wide-rimmed bowls, garnished with hot cooked basmati rice.