Melt chocolate in the microwave (according to package instructions). Let cool slightly. Cream butter and sugar until fluffy. Add egg yolks one at a time, beating well after each. Add melted chocolate and vanilla; mix well. In a separate bowl, whisk together flour, cocoa, salt and baking soda. Add alternately with buttermilk and chocolate mixture; beat until smooth. Stir in boiling water until combined. Fold in stiffly beaten egg whites. Pour into three 8-inch round cake pans, lined on the bottoms with parchment and greased or sprayed with non-stick cooking spray. Bake at 350°F for 30-40 minutes or until a toothpick inserted in center comes out clean. Cool.
For the frosting
In a small bowl, mix together the corn starch and water. Set aside. Combine milk, sugar, egg yolks, butter and cornstarch mixture. Cook, stirring constantly, over medium heat until thickend, about 5 minutes. Add coconut flakes, chopped pecans and vanilla; stir until combined. Let cool. Spread between cake layers and on top of cake. Serve immediately. Store leftover cake covered in refrigerator.