Dalrymple, John, Sir, 1726-1810