A sword-wielding man injured multiple people at a school in Sweden before being shot by police.