Thousands of people have attended the funeral of a student killed in a protest in Niger's capital of Niamey.