Peel, halve, and core the pears and sprinkle over them the lemon juice to stop them from discoloring. In a wide shallow pan (in which the pears will fit in 1 layer - otherwise cook them in batches) put 1 1/4 cups water, the sugar, and the vanilla bean, if using. Bring to a boil, stirring every now and again to make sure the sugar dissolves, then lower the heat slightly and simmer for 5 minutes. Add the vanilla extract, if using. Put the pears into the liquid, cut side down, and raise the heat again so that the syrup boils up and the pears are covered by it. You may need to spoon the syrup over. After half a minute or so, lower the heat, then cover the pan and simmer for 10 minutes; turn the pears, cover the pan again, and simmer for another 10 minutes. Continue poaching until the pears are cooked and translucent; they should feel tender (but not soggy) when pierced. They may need more or less cooking time - it depends on the pears. Take off the heat, keep covered, and leave to cool.
Now the chocolate sauce: place the chocolate, broken up into small pieces, in a thick-bottomed pan with the coffee and sugar and melt over a low heat, stirring occasionally. Then pour in the cream, still stirring, and when it is very hot pour into a warmed sauceboat or a bowl with a ladle.
To serve, arrange pears cut side down on a big flat plate and pour some syrup over. (Any remaining syrup will keep in the refrigerator or freezer and can be used to pour over apples or other fruit when making pies or crumbles. You can wash the vanilla pod, wipe it and put it in a canister of sugar.) Offer with ice cream, sauce, and pistachios, if using, served separately; allow diners to help themselves.