In a saucepan, mix 2 cups of the milk with ¼ cup of the sugar and a pinch of salt and bring to boil over moderate heat, stirring to dissolve the sugar. Then remove it from the heat.
In a bowl, whisk the cornstarch with the cocoa powder and ¼ cup of sugar until blended. Add the ¼ cup of milk and whisk until smooth. Whisk this mixture into the hot milk in the saucepan and bring to a boil over moderate heat, whisking constantly. Reduce heat to moderately low and simmer, whisking constantly, until the pudding is thick enough.
In a bowl, whisk the whole egg with the egg yolks. Gradually whisk about 1 cup of the hot cocoa pudding into the eggs until thoroughly mixed, then mix the pudding into the saucepan. Cook the pudding over moderate heat, whisking until it is almost to a boil (about 2 minutes).
Strain the pudding into a medium heatproof bowl. Add the chopped chocolate, butter, and vanilla and whisk until the chocolate and butter are melted and mixed and the pudding is smooth.
Transfer the pudding to six ramekins and refrigerate until chilled. Serve with whipped cream.