A Swiss police officer and a police informer have been found guilty by a court in Lausanne of spying for Algiers on Algerians living in Switzerland.