How did Cardinal Mazarin give name to a Swedish cake?
Well, it seems that Mazarin's predecessor (and at the time, mentor), Cardinal Richelieu, was instrumental in the creation of the Treaty of Bärwalde, which made Sweden and France steadfast allies (with the French basically funding nearly forty thousand Swedish soldiers). Once Mazarin replaced Richelieu there were already strong diplomatic ties between the two countries. Mazarin was also on amiable terms with Anne of Austria, the queen of France, and as they were both food lovers and promoters (Mazarin in particular worked to spread pasta throughout France) it would make sense that Mazarin, spreading some Italian pastry (perhaps crostata di mandorle?) to Sweden, would end up with the local variant named after him. In short, diplomatic ties brought a new pastry to Sweden, and the Swedes named their version of that pastry after the diplomat in question, Mazarin. I don't have any direct evidence of this happening, but it seems to make sense.

Sources:
http://www.cmariec.com/?p=9157
http://acuriouslittleblog.blogspot.com/2013/10/cardinal-mazarin.html
http://samples.sainsburysebooks.co.uk/9781134741274_sample_496911.pdf
My friend's mother is a Swedish baker and knew Mazarin was some sort of diplomat with ties to Sweden