iterator in Sprite fixes

And replaces some std::for_each() with for() to prevent another object in the stack.
Merge branch 'develop' into node_fixes
Merge pull request #4547 from ricardoquesada/node_fixes

Node fixes with the iterator (thanks James)