Alloway, David Cathcart, Lord, 1764-1829