Thomson, Andrew, 1779-1831