1. In a blender, finely grind juniper berries, coriander, oregano, peppercorns, kosher salt, allspice, cloves, and pecans. Add the garlic and whirl to form a paste.
2. Rub seasoning paste all over tenderloin. Set meat on a rack in a 12- by 17-inch roasting pan. Roast in a 425° oven for 20 minutes.
3. Meanwhile, rinse canned chipotle chili, discard the seeds and veins, and mince the chili.
4. Mix onion slices with oil and put in roasting pan around meat (not on rack). Continue to cook until a thermometer inserted in center of the thickest part of meat registers 130° for rare, 30 to 40 minutes longer.
5. Transfer roast to a platter and let rest in a warm place 10 to 15 minutes (to allow juices to settle and meat to firm slightly for neater slicing).
6. Skim and discard any fat from drippings in roasting pan. Add minced chipotle and broth to onions in pan. Set pan over high heat and scrape browned bits free, stirring until mixture boils vigorously. Pour into a bowl.
7. Slice meat and offer chipotle-onion sauce to spoon over portions. Add salt and pepper to taste.