Was the ability of timelords to regenerate mentioned in any episodes before the first Doctor became the second Doctor?
No. Regeneration was a completely unknown concept to viewers when the first regeneration took place in the final serial of the First Doctor.
Most of the concepts we now accept as canon were added very slowly over the show's long run. The Doctor was meant to be a mysterious character, and the audience did not really know who he was - hence the title of the show. Little was said about The Doctor's species or home planet, and there was no mention of the Timelords until the final serial of the Second Doctor!
The concept of regeneration (although it was not initially called that) was conceived out of necessity. The show was a huge hit and the BBC wanted it to continue, but William Hartnell had shown signs of failing health, and the idea of him changing his face was thought up so that they could bring another actor in. Patrick Troughton apparently made a conscious decision to only stay in the part for 3 years (advice he supposedly passed on to later leading actors on Doctor Who) and so regeneration came to be a feature of the show. The first use of the term "regeneration" was in the Third Doctor's final serial, as he regenerated into the Fourth Doctor.