A Swiss court has found Nestle guilty of "spying" on anti-capitalist protest organisation Attac.