In a bowl, stir together the flour, baking powder and salt. Mix half of the dry ingredients into the butter mixture. Add the heavy cream, vanilla extract and coconut extract. Mix in the remaining dry ingredients. Split the cake batter among the prepared cake pans. Bake in the oven until cooked through and a skewer inserted into the center comes out clean, 35 to 45 minutes.
For the pastry cream: Bring the sugar, cream, vanilla extract and butter to a boil. In a small bowl stir 1/4 cup cold water and the cornstarch together, and then add to the cream mixture. Return to a boil. Stir in the coconut flakes. Cool completely before use.
For the cream cheese frosting: Beat the butter in a stand mixer fitted with a paddle attachment until completely smooth and all of the lumps are gone. Mix in the cream cheese, and mix until most of the lumps are gone. Add half of the sugar and mix. Then scrape the frosting down the sides of the bowl, and add the remaining sugar. Mix until thoroughly combined.
Frost between each the layer of the cake with the pastry cream and then stack the layers on top of each other. Frost the outside of the cake with the cream cheese frosting.