In a large saucepan bring all of the brine ingredients, except the cider, to a simmer, stirring to dissolve the salt and sugar. Remove from the heat, add the cider, and cool to room temperature. Place the pork in a deep pan or container just large enough to hold the pork. Pour in the brine. Cover the pan and refrigerate for 8 to 12 hours. One hour before grilling, remove the pork from brine, discard the brine, and pat the pork dry with paper towels.
In a small bowl combine the rub ingredients. Smear the rub all over the pork. Let stand at room temperature while you prepare the grill.
Prepare the grill for indirect cooking over medium heat (350° to 400°F).
Prepare the grill for cooking over medium heat (400°F).
In a large bowl combine the apples, onions, oil, salt, and black pepper and stir to coat.
Place the pork in a large grill pan. Spread the apples and onions around the pork. Scatter the rosemary and thyme sprigs over the vegetables.
Grill the pork over indirect medium heat, with the lid closed, until an instant-read thermometer inserted into the center of the roast registers 145°F 1 1/2 to 2 hours (or your preferred doneness), turning every 30 minutes and stirring the apples and onions to cook evenly. If the apples and onions are softened and slightly caramelized before the pork is finished cooking, transfer them from the grill pan to a separate baking dish, loosely cover with foil, and let stand at room temperature indoors.
Grill the pork above foil pan, over medium heat, with the lid closed, until the center of the roast registers 145°F 1 1/2 to 2 hours (or your preferred doneness), turning every 30 minutes and stirring the apples and onions to cook evenly. If the apples and onions are softened and slightly caramelized before the pork is finished cooking, transfer them from the grill pan to a separate baking dish, loosely cover with foil, and let stand at room temperature indoors.
When the pork is ready, transfer the roast to a cutting board, tent with foil, and let rest at room temperature, indoors, for 20 to 30 minutes.
Cut the roast into slices. Arrange on a serving platter with the apples and onions and drizzle with the pan juices.