One person has died and four are injured after being attacked by a masked man with a sword at a school in Sweden. The suspect has been shot.