I'm pretty sure they had a plan each season in case the show was cancelled. I think any of Victoria, Robin or Stella could have been the mother, yet as the show was popular they kept stretching it out.
I also think it was geared towards Robin being the mother, with the show being about his relationship with the mother. But since it was stretched out so much it turned into a show about Barney and Robin's relationship with Ted being the creepy guy who sleeps with every girl he sees and tells his kids about it. It feels like it has less impact now as the relationship between Ted and the mother won't be explored, he'll just meet her and that's the end. So it makes the show an exploration of every relationship Ted was in except the one that worked, if it's true that season 9 takes place entirely over Barney and Robin's wedding.