Step 1Trim away all fat, sinew and membrane from the pork. Cut the meat into 2-inch chunks. In a small bowl, stir together the salt, peppercorns, bay leaves, fennel and thyme. Put the meat and the spicing mixture in a large sealable bag and massage the seasonings into the pork. Squeeze out all the air, seal tightly and refrigerate for at least 6 hours or overnight.
Step 2Heat the oven to 250 degrees. Without draining the meat, squeeze the pieces into a medium ceramic or enameled cast-iron casserole in a single layer. Pour on the olive oil to cover completely. Cover with a sheet of crumpled parchment and a lid, set over very low heat and cook until the oil comes to a boil, 30 to 45 minutes.
Step 3Add the halved head of garlic, transfer the pan to the oven and cook for 2 1/2 hours longer. Check that the oil bubbles only a little; the meat should not brown. To test if the pork is ready, scoop out one piece and tap it lightly; it should break into smaller chunks and be a soft pink color. Remove from the oven and let stand until completely cool. Refrigerate for up to 5 days. (Be sure the pork is completely covered in oil; add additional fresh oil, if necessary.)
Step 4Before serving, reheat the pork slowly. At the same time, soak the red onion in 1 tablespoon of the vinegar for 30 minutes. Drain the pork in a colander set over a bowl to catch the juices; discard the garlic and thyme.
Step 5Set the bowl of juices aside to settle, and break up the pork cubes roughly with a fork. When the juices have settled, pour off the olive oil floating on top (you can save this to use for cooking; it's delicious), reserving about one-fourth to one-half cup. Stir the meat juices into the meat along with just enough of the olive oil to make the shreds shiny and slightly sticky. Taste and correct the seasoning. Spoon the meat mixture onto the warm toasted bread and top with a little pickled onion.