Shares in the world's biggest pizza company have sold off sharply after a mixed earnings result, even though it swung to a profit as revenues declined.