Last-gasp Cavani qualifies Napoli