Make the glaze: In a food processor, combine the butter, 6 tblsps of the maple syrup, 3 tblsps of the lemon juice, the lemon zest, coarsely ground pepper and salt; process until blended and transfer to a bowll; in another bowl, combine the remaining ¼ cup maple syrup, 1 tblsp lemon juice and finely ground pepper (can be made 1 day ahead return to room temperature before proceeding).
Marinate the turkey: In a 2-gallon plastic bag, combine the lemon juice, maple syrup, olive oil, shallots, garlic, thyme, bay leaves, lemon zest and pepper; add the turkey to the bag, squeeze out as much air as possible and seal the bag; distribute the marinade evenly over and inside the turkey (think of this as a therapeutic, turkey massage); set the turkey, breast side down, in a bowl in the refrigerator and marinate for 24 hours, turning occasionally.
Preaheat oven to 450F; position the oven rack near the bottom of the oven.
Wipe off the shallots and garlic from the turkey and pat dry; strain the marinade into a bowl, skim off the oil and reserve; set the herbs, garlic and shallots aside separately.
Using your fingers, carefully loosen the turkey skin over the breast and thighs; put all but 3 tblsps of the softened maple-pepper butter under the breast and thigh skin, patting gently to spread the butter; put 1/3 each of the diced onions and celery in the cavity; tie the legs together with kitchen string and set the turkey, breast side up, on a rack in a large roasting pan; rub the breast and thigh skin with the remaining maple-pepper butter and roast for 30 minutes, basting twice; because the sugar in the maple syrup may cause the turkey skin to brown quickly in places, cover loosely with foil; lower the oven temperature to 350F; spread the remaining onions and celery around the turkey and roast for about 1 ½ hours longer, or until an instant-read thermometer inserted in the thickest part of the breast, just above the wing-joint reaches 165F, and the juices run clear.
Transfer to a carving board and let stand, loosely covered with foil, for 30 minutes; remove the whole legs from the turkey, cutting them off at the hip joint; cut off the wings from the breast; return the wings and legs to the pan and roast for about 30 minutes longer, until an instant-read thermometer inserted in the thickest part of the thigh reaches 180F and the juices run clear; transfer the legs and wings to the turkey on the carving board, cover with foil and let stand for 15 minutes before carving.
Make the gravy: Set the roasting pan over 2 burners over high heat and cook the vegetables, stirring, until golden brown; carefully pour off all but 2 tblsps of the fat; add the flour and whisk for 1 minute; add the reserved marinade and the chicken stock and bring to a boil, scraping up any browned bits; simmer, whisking constantly, for 3 minutes; strain the gravy into a saucepan and boil over high heat until reduced by half, about 10 minutes; season with salt and pepper; serve alongside the turkey.
Note: The standing period before removing the turkey legs and wings, along with the extra roasting time for these parts will have resulted in the main carcass having cooled down considerably; while making the gravy, cover the turkey with foil and pop back into a slow oven to warm up.