Scientist James Lovelock gave humanity new ways to think about our home planet – but some of his biggest ideas were the fruit of a passionate collaboration. By Jonathan Watts