Charles Darwin, Geologist