Jailers, inmates charged in beating