Rensselaer Whitfield Cowles, 1796-1842