Far from being untouched wilderness, the Amazon was shaped by pre-Columbian societies with a keen understanding of ecology.