Years before a deputy killed Sonya Massey, sheriff’s office failed to police misconduct within its ranks