The problem I'm trying to solve here is the the console output on linux is made much harder to read when CCLog callsites includes \n a the end of the string.  The newline is implicitly added by the fprintf in this function so is not needed at the callsite. I'm only stripping trailing newlines not all newlines.

If you think we should leave it to the developer to remember they don't need to add newlines (unlike printf where they need them) then we can remove this part of the change and only update the callsites in cocos2dx code where extraneous newlines were includes?  I'm happy to make this change if you like?

What do you think?