Della Casa, Giovanni, Archbishop of Benevento, Papal nuncio and secretary