Thousands of students armed with sticks and stones clashed with armed police in Bangladesh following days of violent confrontations local media say have killed at least 39 people.