Whisk the sugar, cornstarch, and salt together in a medium-size heavy saucepan, preferably nonstick. Whisk in the milk and yolks. Place over medium heat and cook, whisking until the mixture thickens and starts to boil—about 5 to 7 minutes. Remove from the heat and whisk in the butter, one piece at a time. Whisk in the vanilla, coconut extract, and coconut.
Pour the filling into the pie shell and smooth the top with a spoon. Place a piece of plastic wrap over the filling and smooth with your fingers to remove any air gaps. (The plastic keeps a “skin” from forming.) Transfer the pie to a rack and cool thoroughly. Refrigerate overnight.
Put the coconut into a skillet over moderate heat and toast, stirring constantly, for 3 to 5 minutes, or until golden brown. Immediately transfer to a plate. About 10 minutes before you plan to serve the pie, chill a bowl and your electric mixer’s beaters for 5 minutes. Beat the cream until it holds soft peaks, then beat in the confectioners’ sugar. Add the vanilla and beat until the cream is stiff but not grainy. Spread the cream over the pie and sprinkle with toasted coconut.