Public schools have a lot of problems. It may sound shocking, but they actually have a lot in common with prisons.