1. In a mixing bowl, whisk the flour, salt, and sugar together (if using honey or agave nectar, dissolve it in the lukewarm water instead). Separately, combine the water and buttermilk, whisk in the yeast until dissolved, then pour the mixture and the melted butter into the dry ingredients. If using a mixer, use the paddle attachment and mix on the lowest speed for 2 minutes. If mixing by hand, use a large spoon and stir for about 2 minutes. Let the dough rest for 5 minutes.
2. Switch to the dough hook and mix on medium-low speed, or continue mixing by hand, for 3 minutes, adjusting with flour or liquid as needed. The dough should be soft, supple, and tacky but not sticky. Add the onions and mix on the lowest speed or continue mixing by hand for 1 minute, until the onions are evenly distributed.
3. Transfer the dough to a lightly floured work surface and knead for 1 or 2 minutes to make any final adjustments, then form the dough into a ball.
4. Place the dough in a clean, lightly oiled bowl, cover the bowl with plastic wrap, and immediately refrigerate overnight for for up to 4 days. (If you plan to make the dough in batches over different days, you can portion the dough and place it into two or more oiled bowls at this stage.) The dough should double in size in the refrigerator. If you want to bake the bread the same day you mix the dough, don't refrigerate the final dough; just let it rest at room temperature for 60 to 90 minutes, until it doubles in size. Then proceed to shaping and baking as described below.
5. Remove the dough from the refrigerator about 2 hours before you plan to bake. Transfer the dough to a lightly floured work surface and divide it into 2 equal pieces, each weighing about 2 pounds (907 g). Dust each piece with flour, then use a rolling pin to roll them into rectangles about 8 inches wide and 12 inches high. Spread half of the cheese over the surface of one rectangle and roll the dough up like a rug, from the bottom to the top, to form a log. If any cheese falls out, tuck it back in or save it for the second loaf. Seal the seam with your fingertips. For a sandwich loaf, proof in a greased 4½ by 8-inch loaf pan (or a 5 by 9-inch pan if using onions, which increase the volume of the dough). For a freestanding batard or rolls, proof on a sheet pan lined with parchment paper or a silicone mat. Another option is to cut the log into 1½-inch slices to make spiral rolls; place spiral rolls about 1 inch apart in greased round pans or on a parchment-lined sheet pan. Mist the shaped dough with spray oil and cover loosely with plastic wrap, then let the dough rise at room temperature for about 90 minutes, until increased to about 1½ times its original size. In loaf pans, the dough should dome about 1 inch about the rim.
6. About 15 minutes before baking, preheat the oven to 350°F (177°C), or 300°F (149°C) for a convection oven. Because of the cheese, there may be air pockets or tunnels in the risen dough that could cause it to separate in the spirals (cubed cheese creates fewer air pockets than grated or shredded cheese). To minimize this, poke through the top crust in a few spots with a skewer or toothpick. The dough may fall a bit, but it will recover in the oven.
7. Bake loaves for 20 minutes, then rotate the pans; rotate rolls after 10 minutes. The total baking time is about 50 minutes for loaves, and only 20 to 25 minutes for rolls. The bread is done when it's a deep golden brown and the internal temperature is about 185°F (85°C) in the center.
8. Remove from the pans and cool on a wire rack for at least 15 minutes for rolls and about 1 hour for loaves before slicing or serving.