In 1852, young Walt Whitman - a down-on-his-luck housebuilder in Brooklyn - was hard at work writing two books.