It's called "Spintax". People in the internet marketing business use this all the time. Not just for comment spam, but to generate different versions of entire articles for submission to article directories and what not.
This is one of the more well known "spinners" as they are called: http://thebestspinner.com/