De Tavora, Francisco, Conde de Alvor, Portuguese Secretary of State