Ainslie, Whitelaw, Sir, 1767-1837