Switzerland has granted diplomatic immunity to the World Economic Forum.