Brine turkey: Bring 1 quart water, sugar, 3/4 cup salt, bay leaves, and peppercorns to a simmer in a large stockpot, stirring. Remove from heat; let cool 5 minutes. Line a 5-gallon container with a large brining bag. Place turkey in bag. Add salt mixture, remaining 6 quarts water, onions, garlic, thyme, and all but 1 1/2 cups of the wine. Tie bag; if turkey is not submerged in brine, weight it with a plate. Refrigerate 24 hours, turning turkey once. Remove turkey from brine; pat dry with paper towels. Let stand at room temperature 2 hours.
Preheat oven to 425 degrees, with rack in lowest position. Stir melted butter and remaining 1 1/2 cups wine in a bowl. Fold a very large piece of cheesecloth into quarters (large enough to cover breast). Immerse cloth in butter mixture; let soak.
Place turkey, breast side up, on a cutting board. Tuck wing tips under. Blend 4 tablespoons room-temperature butter with 2 teaspoons salt and 1 teaspoon ground pepper. Loosen turkey's skin at body-cavity end; spread mixture under skin.
Rub outside of turkey with remaining 4 tablespoons room-temperature butter; season with salt and pepper. Sprinkle salt and pepper inside body and neck cavities. Loosely fill cavities with stuffing. Fold neck skin under; secure with toothpicks. Transfer turkey to a rack set in a roasting pan. Tie legs together with kitchen twine.
Remove cheesecloth from butter mixture, gently squeezing out excess liquid into bowl. Reserve butter mixture for brushing. Lay cheesecloth over turkey breast. Place turkey, legs first, in oven. Roast 30 minutes. Brush cheesecloth and exposed turkey with butter mixture. Reduce temperature to 350 degrees. Roast 1 1/2 hours more, brushing every 30 minutes; tent loosely with foil if turkey is browning too quickly.
Discard cheesecloth; rotate pan. Baste turkey with pan juices. Roast until skin is golden brown and turkey is cooked through, rotating pan halfway through, 1 to 2 hours more. (Although the USDA recommends cooking turkey until it registers 180 degrees, we suggest cooking it only to 165, which will keep it moist; the temperature will continue to rise after the meat is taken out of the oven.) Transfer to a platter, reserving juices in pan. Let turkey stand at least 30 minutes before carving. Garnish as desired, and serve with gravy.