The day ahead of grilling the pork tenderloin(s), have a gallon of water coming to a boil in a 2.5-gallon pot. If intending to brine only one or two tenderloins, reduce the quantity of brine ingredients, including less water. Add the kosher salt (less if table salt), the brown sugar, dried thyme, juniper berries (Spice Islands bottles these, to name one brand; juniper berries are commonly used in sauerbraten marinades for beef and by distillers to flavor gin), the star anise, bay leaves and peppercorns. Reduce boiling water to a simmer and continue cooking for 5 minutes. Remove from heat and add the additional gallon of icy-cold water; the brine is ready to use.
Place large cuts of meat in a 5-gallon food-grade bucket or cooler and cover with the brine (use a smaller container and a lesser amount of brine for a single pork tenderloin or two). Hold the pork in brine for 8 to 16 hours in a refrigerator.
When ready to grill, remove pork from brine, rinsing and patting dry with paper towels. Brine must be discarded, so make up a batch just large enough to cover the pork to be brined, thus reducing the quantity and cost of the spices in the brine.
For the spice rub, grind in a spice grinder the coriander, cumin, fennel, mustard seeds and bay leaves. Blend with the dried oregano, onion powder, garlic powder, paprika and black pepper, but no salt. Store in a spice bottle with a tight lid, using enough to cover the pork tenderloin(s) with the rub. Let stand 30 minutes at room temperature.
Meanwhile, prepare a charcoal fire (indirect heat; medium-hot) or preheat a gas grill to medium-high. Grill the tenderloin(s), the thin part doubled under and fastened with wooden picks, until an instant-read thermometer registers 145 degrees internal temperature in the thickest part of the tenderloin. After grilling 15 to 20 minutes, open grill and brush the tenderloin on all sides with your favorite prepared barbecue sauce. Continue grilling to end-point internal temperature, about 5 minutes more.
Remove pork to a clean platter or cutting board and let stand for 5 to 10 minutes before cutting into 1/4-inch bias slices.