There's a difference between a class clown and a trouble child, with the former being beneficial to the class and the latter to be dealt with in a disciplinary fashion. Class clowns can break the tension, if they're good, in the event of a serious situation in class, and the best serve to keep everybody's spirits high.
Humor can inadvertently be attributed to intelligence. It is in no way a direct indicator, but there is a sort of methodical process in good comedy. Numerous A-list comedians are also high scorers on IQ tests, and I personally believe the presence of a class clown does not detract from the educational environment. It is the responsibility of educational administration to harness & regulate these clowns though.