How to Make It
Whisk together Dijon, whole-grain mustard, sherry, 2 tablespoons butter, thyme leaves, cayenne, and 1 teaspoon salt in a large bowl until combined. Add pork loin to bowl, turning to coat. Cover and chill at least 4 hours or up to overnight.
Preheat oven to 350°F. Remove pork loin from marinade, reserving 3 tablespoons marinade. Discard remaining marinade. Season pork on all sides with 2 teaspoons salt.
Heat 2 tablespoons oil in a large skillet over high. Add pork, and cook until browned on all sides, about 4 minutes per side. Remove from skillet, and set aside. Toss together red onions, cipollini onions, shallots, 2 teaspoons salt, 1/2 teaspoon black pepper, and remaining 2 tablespoons oil. Add half of onion mixture to skillet, and cook, without stirring, until browned on one side, about 2 minutes. Remove onion mixture from skillet, and place in bottom of a heavy-duty metal roasting pan. Repeat with remaining half of onion mixture.
Place a roasting rack over onions in roasting pan, and place browned pork on rack. Bake in middle of preheated oven until a meat thermometer inserted into center of pork registers 130°F, about 1 hour. Remove pork from pan, and transfer to a cutting board. Let rest 20 minutes before slicing. Using a slotted spoon, transfer onions to a plate.
While pork rests, place roasting pan on stovetop. Add wine, brown sugar, thyme sprigs, reserved 3 tablespoons marinade, remaining 1/4 cup butter, remaining 1/2 teaspoon salt, and remaining 1/4 teaspoon pepper; stir to combine. Cook over medium until butter is melted and mixture is reduced by half, about 2 minutes. Transfer wine mixture to a small saucepan. Add 1/2 cup water and any accumulated pork juices on cutting board. Bring to a boil over medium-high, and cook 5 minutes. Remove from heat.
Arrange pork loin (sliced or whole), roasted onions, and fresh thyme sprigs on a serving platter. Spoon wine sauce over top, and serve.