Brigadier General William Goldsmith Belknap, 1794-1851