1. In a 10- to 12-inch frying pan over medium-high heat, stir butter, onion, and garlic often until onion is limp, 5 to 7 minutes. Stir in thyme, coriander, allspice, and white pepper. Remove from heat.
2. In a bowl, with a mixer on medium speed, beat pork, eggs, 1 teaspoon salt, and flour until well blended. Add milk and onion mixture; beat until blended. Stir in pistachios.
3. Spoon the meat mixture into an oiled 8- to 9-cup terrine or deep casserole, or a 5- by 9-inch loaf pan. Spread mixture level; seal with foil or casserole cover.
4. Bake in a 350° oven until a thermometer inserted in center of terrine reaches 155° (or terrine is no longer pink in center; cut to test), about 1 hour. Uncover and let cool at least 1 hour. Cover and chill until cold, at least 3 hours, or up to 1 day. Scrape off and discard any solid fat from meat.
5. Pour 1/4 cup consommé into a 1- to 2-quart pan. Add gelatin and stir mixture over medium-low heat until gelatin is dissolved, about 2 minutes, then stir in remaining consommé. Pour over terrine. Rinse and dry bay leaves and lay on terrine; sprinkle evenly with peppercorns. Cover and chill until consommé is firm, at least 1 1/2 hours.
6. Slice terrine crosswise in casserole; use a wide spatula to lift out slices. Add salt to taste.