Optimal Energy Investment and R&D Strategies to Stabilise Greenhouse Gas Atmospheric Concentrations