Wood has been vital in the development of human civilisation. Brian Clegg looks at the compound at its heart