Afghan army chief, minister resign after deadly attack