Community structure and ethnic preferences in school friendship networks