John Lowther, 1st Viscount Lonsdale (1655–1700), First Lord of the Treasury and Lord Privy Seal