Preheat the broiler grill on the oven and set the top rack so it is about 7 inches from the top element. Prepare one 9-inch (23 cm) springform pan or two 8-inch (20 cm) springform pans by greasing them and lining the bottom with a circle of parchment paper cut to fit.
In a medium bowl, cream the almond paste with the butter using an electric mixer until smooth and fluffy.
Separate the eggs, putting the yolks into a small bowl and the whites into a large mixing bowl.
Beat the egg whites until soft peaks form, then gradually add the sugar and continue beating until thick and glossy.
Scoop out about ¼ of the beaten whites and stir them into the yolk mixture until incorporated.
Sift together the flour and cornstarch into a small bowl.
Add one third of the yolk mixture to the beaten egg whites and sprinkle with one third of the flour mixture. Fold gently together. Repeat until all is incorporated.
If using apricot jam, heat ½ cup until melted.
Plop a heaped half-cup of batter into the prepared pan and smooth into a thin layer. Broil until dark golden brown, about 45 to 60 seconds.
Remove from the oven and add another layer of batter. Broil again, watching closely.
Continue layering and broiling, adding apricot jam every third layer if desired.
Once all layers are done, let the cakes cool completely. If using two pans, spread remaining jam on one cake and stack the other on top.
To glaze, heat remaining apricot jam and brush over the cake.
In a small saucepan, heat chocolate, cream, coconut oil, and rum until melted and smooth. Allow to cool slightly.
Pour the glaze over the cake and spread to cover. Optionally, pat toasted almonds onto the sides.
Let the glaze set, then serve with whipped cream.
