Cook onion in butter in a 10-inch heavy skillet, covered, over moderately low heat, stirring frequently, until soft, about 10 minutes. Add garlic and thyme and cook, stirring, 1 minute. Transfer to a large bowl set in a bowl of ice.
While onion cools, pulse salt, peppercorns, allspice, nutmeg, and bay leaf in grinder until finely ground. Add to onion mixture and whisk in cream, eggs, and brandy until combined well.
Pulse chicken livers in a food processor until finely chopped, then add to onion mixture along with ground pork and veal and mix together well with your hands or a wooden spoon. Stir in ham cubes.
Line bottom and long sides of terrine mold crosswise with about 6 to 9 strips of bacon, arranging them close together (but not overlapping) and leaving a 1/2- to 2-inch overhang. Fill terrine evenly with ground-meat mixture, rapping terrine on counter to compact it (it will mound slightly above edge). Cover top of terrine lengthwise with 2 or 3 more bacon slices if necessary to cover completely, and fold overhanging ends of bacon back over these. Cover terrine with plastic wrap and chill at least 8 hours to marinate meats.
Put oven rack in middle position and preheat oven to 325°F.
Discard plastic wrap and cover terrine tightly with a double layer of foil
Bake terrine in a water bath until thermometer inserted diagonally through foil at least 2 inches into center of terrine registers 155 to 160°F, 1 3/4 to 2 hours. Remove foil and let terrine stand in mold on a rack, 30 minutes.
Put terrine in mold in a cleaned baking pan. Put a piece of parchment or wax paper over top of terrine, then place on top of parchment another same-size terrine mold or a piece of wood or heavy cardboard cut to fit inside mold and wrapped in foil. Put 2 to 3 (1-pound) cans on terrine or on wood or cardboard to weight cooked terrine. Chill terrine in pan with weights until completely cold, at least 4 hours. Continue to chill terrine, with or without weights, at least 24 hours to allow flavors to develop.
Run a knife around inside edge of terrine and let stand in mold in a pan with 1 inch of hot water (to loosen bottom) 2 minutes. Tip terrine mold (holding terrine) to drain excess liquid, then invert a cutting board over terrine, reinvert terrine onto cutting board, and gently wipe outside of terrine (bacon strips) with a paper towel. Let terrine stand at room temperature for 30 minutes before serving, then transfer to a platter if desired and cut, as needed, into 1/2-inch-thick slices.
Terrine can be marinated (before baking) up to 24 hours.
Terrine keeps, wrapped in plastic wrap and chilled, 2 week. original