A masked man brandishing a sword broke into a school in Sweden on Thursday, killing two people and seriously wounding two others before being shot by police.