New ClassAds already have a compatibility version of this method, but it doesn't handle chained ads.

It also doesn't print MyType or TargetType if they're not set, nor does it print them first. In old ClassAds, if these are unset, they're printed as empty strings. This shouldn't matter, as the old ClassAds methods that read from a file don't care about the presence or ordering of MyType and TargetType.

Developer time: 4 hours

Progress: Method now handles chained ads.