A seven-year-old boy has been handcuffed, removed from school and taken to a police station for repeatedly punching a teacher.