The Dutch far-right opposition leader Geert Wilders has been convicted of discrimination and "insulting a group" after a trial over statements he made about Moroccans.