Minnows Cape Verde scored twice in the last nine minutes to stun Angola 2-1 and seal their spot in the quarter-finals of the African Nations Cup.