Hamlin, Cyrus, 1839-1867