The University of Edinburgh will move away from fossil fuel investments in the next three years.