The Swedish government said on Friday it had decided to ban all public gatherings of more than 50 people to stop the spread of the coronavirus.