I don't think the trial was on Gallifrey, was it? I seem to remember it being on some big, hokey looking ship.
The Doctor apparently can encounter other Time Lords through history (as shown by his eagerness to meet with the Corsair and others, plus his encounters with the Master). And though it can cause problems with the time stream, he's capable of encountering past versions of himself (as seen in the Big Bang). I'm willing to bet the Valeyard thing is completely ignored, though.
From what I understand, the regenerations are a product of billions of years of exposure to the time vortex. The High Council had the ability to tap into that energy and transfer it to other Time Lords if they wanted to.
I'm not sure the Doctor knows how to do that. He would have probably given it to River if he could (knowing she sacrificed her remaining regenerations for him and knowing she was going to die in the Library).