Sheriff: Maricopa County jail officer badly beaten by inmate