Researchers have reverse engineered the way a pine tree produces a resin, which could serve as an environmentally friendly alternative to a range of fossil-fuel based products worth billions of dollars.