At least 19 people have been killed in Chad where security forces said they had prevented an attack by armed fighters.