Edinburgh's Olympic cycling hero Sir Chris Hoy has revealed he has terminal cancer, with between two and four years to live.