STOCKHOLM—A Swedish court on Tuesday found a man guilty of murdering a woman and of planning to kill a senior politician at a festival in July, and ordered that he be taken into psychiatric care. The 33-year-old Swede was arrested on the Baltic Sea island of Gotland moments after he had stabbed to death a…