ROME — Citing advanced years and infirmity, Pope Benedict XVI stunned the Roman Catholic world on Monday by saying that he would resign on Feb. 28 after less than eight years in office, the first pope to do so in six centuries.