Preheat your oven to 400 degrees F and position the rack to the center of the oven.
Lightly butter a 7-inch springform pan and line with parchment: dust the sides with flour and tap out an excess.
In a double-boiler, melt the chocolate over simmering water; remover from heat and stir until cooled.
In a stand mixer fitted with the paddle attachment, beat the butter using medium-high speed until smooth, about 1 minute.
Switch to low speed, beat in the powdered sugar, then return to medium-high, and beat until fluffy and lighter in color and texture, about 2 minutes.
Beat in the egg yolks first, one at a time, scraping down the sides of the bowl; beat in the chocolate and the vanilla.
In another large bowl, beat the egg whites with the castor sugar, using high speed, until they form soft, shiny peaks.
Stir 1/4 of the egg whites into the chocolate mixture, then fold in the remaining, leaving some strips of white showing.
Sift half the flour over the sugar, then fold in; repeat with remaining flour.
Spread the batter evenly into the prepared pan and bake until a wooden toothpick inserted into the center comes out clean, about 45 minutes.
Cool on a wire rack for 10 minutes, then remove the sides of the springform pan and invert the cake onto the rack, remove the paper and re-invert to turn right side up and let cool completely.
Use a serrated knife to trim the top of the cake to make it level; cut the cake horizontally to make two even layers.
Place the bottom layer on an 8-inch cardboard cake round; brush the top of the layer with half the warm apricot glaze.
Place the second layer on top, then brush with the remaining glaze; transfer the cake to a wire rack that has been set over a jellyroll pan (to catch drips) and let the glaze set.
Pour the warm chocolate glaze over top and use an offset spatula to gently spread the glaze all over, including the sides, so that the cake is completely covered; use any glaze that drips to patch missed spots.
Once glaze has begun to set, place cake on a serving platter and cool completely in the refrigerator at least an hour; let the cake stand at room temperature 1 hour before serving.
If desired, serve with a saucer of unsweetened whipped cream for dipping.
For the apricot glaze: In a small saucepan, bring the preserves and rum (or water) to a boil over medium heat, stirring often; cook, stirring, until very sticky and does not easily leave the spoon, 2 to 3 minutes. Strain through a wire sieve, pressing on the solids. Use warm.
For the chocolate glaze: In another small saucepan, heat the sugar, water, and chocolate to a boil over medium-high heat, stirring occasionally. Reduce the heat to medium and cook, uncovered, stirring, until it reaches 234 degrees F on a candy thermometer, about 5 minutes. Remover from heat and stir to cool for about 1 minute. Use immediately and do not scrape the pan (the chocolate that clings to the saucepan will not be a glaze, it is too thick).