Cooke, Edward, 1755-1822, Under-Secretary of State