More than 10 million tonnes of CO2 emissions were displaced by renewable electricity generation in Scotland in 2012 - up by almost a quarter from the previous year, according to new figures.