A Swedish court handed a four-month prison term to the Danish far-right politician who started a series of Koran burnings that complicated the Nordic country’s accession to NATO.