Avon teacher apologizes for using racial slur in class